Starting from:
$35

$29

Programming Languages In-Class Exercise 1 Solution

Programming Section – (Each question 25pts.)







Start the Python interpreter and use it as a calculator.




Create a single python script file containing all of your code. Include your name and session inside the file. Also include your answers of first part in the script by commenting them. Send your script file to (ayuksel@ccny.cuny.edu) with the subject of “11300-Morning/Afternoon – InclassAssignment1”. For the formulas you can use the Internet. but Internet copy-paste answers will be scored 0.




How many seconds are there in 42 minutes 42 seconds? 




The volume of a sphere with radius r is 4 3πr3. What are the volume of a sphere with radius 4? And another 
one with radius 6? (Hint: pi=3.14159265 but import and use the exact number from the necessary module) 




Show in Python for -40° is the same temparature in both Fahrenheit and Celsius. (Run the conversion for 
-40°) 




Suppose that you have a rectangular prism R with sides a, 2a, 3a and a cube C with side a. How many of C can fit in R?

More products