You are on page 1of 2

CS

1) Write a python program that prompts the user for two floating point values
and display the result of the first number divided by the second number
exactly 6 decimal places.
2) Write a program that asks the user to enter the width and length of the
room, once the value has been read your program should compute area of
the room. The length and width will be entered as floating point number
include units with in your prompt output message.
3) Write a program that reads a positive integer n, from the user and display
the sum of all the integers from 1 to n.
4) Write a program that begin by reading radius r and the program will
continue by computing and displaying the area of the circle with radius
rand volume of the sphere with radius r (Use pi constant in the math
module in you calculation)
5) Develop a program that begins by reading a number of seconds from the
user then your program should display the equivalent amount of time in
the form D:HH:MM:SS where D,HH,MM,SS represents days, hours, minutes,
seconds.
6) Create a program that reads a data from the user as a number of days,
hours, minutes and seconds. Compute and display the total number of
seconds represent by this duration.
7) Write a program to determine number of days in a given month and display
a calendar month between 1800 to 2900.
8) Write a function that takes three numbers as parameters, and returns the
median value of those parameters as it result. Include a main program that
reads 3 values from the user and displays the median.(HINT: Median is the
middle of the three values when they are sorted into ascending order. It
can be found using if statements or while.)
9) Compute the grade point average of an arbitrary number of letter grades
entered by the user. The user will enter a blank line to indicate that all of
the grades have been provided. For example if the users enter A, followed
by C+, followed by a blank line then your program should report a grade
point of average 3.1.
Grades : Average

A+ : 4.0

A : 4.0

A- : 3.7

B+ : 3.3

B : 3.0

B- : 2.7

C+ : 2.3

C : 2.0

C- : 1.7

D+ : 1.3

D : 1.0

F : 0

You might also like