Computer Science, asked by mamtachhetri399, 3 months ago

Input your name and the time you study each day and output the time in seconds​

Answers

Answered by allysia
7

Language:

Python

Logic:

  • Take input in hours or minutes (I will take hours) in a variable
  • Convert to seconds by multiplying with appropriate factor
  • Return the output

Program:

name = input("Enter your name: ")

time =float(input("Enter the time you study per day (hours): " ))

in_sec= time*60*60

print("You've been studing for", in_sec,"seconds",name )

Similar questions