r/pythonhelp • u/Nonna1214 • Jun 05 '22
Assistance with an output, please!
Hello, Can anyone help me with how to achieve this output:
Enter a number of seconds: 11730
Here is the time in Hours, Minutes, and Seconds:
Hours: 3.0
Minutes: 15.0
Seconds: 30.0
**We were provided this tip:
hours = yourVariable //3600
minutes=(yourVariable//60)%60
seconds=yourVariable%60
0
Upvotes
1
u/CraigAT Jun 05 '22
Homework/Assignment? You should use the post flair.
What have you got so far?
You can use input() to get the input, int to make the input into an integer/number, then use the division and remainder/modulo equations you were given to calculate the amounts, then use print() to output your results.