11300 Lab assignment 1 (morning)

pdf

School

The City College of New York, CUNY *

*We aren’t endorsed by this school

Course

1130

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

2

Uploaded by BaronPuppyPerson1126

Report
CSC 11300 - Morning Session Lab Assignment 1 () September 15, 2020 Send your codes to the instructor via e-mail (ayuksel@ccny.cuny.edu) or on Zoom directly. Make a script file that includes example results as comments. Add your name and the session (morning/afternoon). Just the mathematical solutions will not be accepted. You may NOT use the Python3 codes we have not learned so far(loops, conditionals, functions, classes etc). If an incorrect format is submitted or the assignment is submitted to a wrong place your assignment will face a score penalty. Question 1. Write a Python3 program to convert minutes to milliseconds. Run your program for some example input. Question 2. Use the math module import to use square root and compute the roots of a quadratic equation. Run your program for the coefficients a, b, c as 1, 2, 1 respectively. Δ = b 2 - 4 ac x = - b ± Δ 2 a Question 3. Write a Python3 program to calculate the overall grade(0-100) for the midterm exam score with weight 40% and final score with weight 60% . Question 4. Write a Python3 program to calculate the overall grade(0-100) for the midterm exam score with weight 40% and final score with weight 60% . Question 5. Write the Python3 code to bring all installed modules to the screen, and then pick some of it to view the functions, variables defined in it. Question 6. Write a Python3 program to calculate the area of a triangle. Use Heron’s formula given below to calculate the area. 1
CSC 11300 - Morning Session () Lab Assignment 1 Question 7. Say you have a cube with side of n . And you have some amount of marbles (round, sphere!) with radius n/ 4 How many marbles can you fit in the cube? Obtain the solution by using Python3 and test your program with some sample input. Question 8. Write a Python3 program to convert a Celsius value (user input) to Fahrenheit, Kelvin, Réaumur, and Rankine and print them all. 2
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help