119k views
2 votes
Input the time in hours. Calculate and print the time in minutes and seconds. [I hr = 60 minutes]

User Ivelin
by
6.5k points

1 Answer

4 votes

Answer:

The program in Python is as follows:

hrs = float(input("Hours: "))

mins = 60 * hrs

print("Minutes: ",mins)

Step-by-step explanation:

This prompts the user for hours

hrs = float(input("Hours: "))

This converts to minutes

mins = 60 * hrs

This prints the minutes equivalent

print("Minutes: ",mins)

User Brian Harris
by
6.1k points