- 10

Random task! You need to calculate the number of hours in 888 minutes. Your program needs to output the number of hours

14th Jun 2021, 8:36 AM
Sambavi Lovely
Sambavi Lovely - avatar
14 Antworten
+ 13
minutes = 888 hours = 60 print(minutes//hours) print(minutes%hours)
18th Aug 2021, 9:07 PM
Justen Roldan
+ 3
You can use floor division to find the number of hours, and the modulo operator to find the remaining minutes. Use separate print() statements for each output.
15th Jun 2021, 1:25 PM
Sambavi Lovely
Sambavi Lovely - avatar
+ 1
#Code to calculate the number of hours in 888 minutes minutes = 888 #minutes hours = 60 #hours print (minutes // hours) #floor division print (minutes % hours) #modulo operator
21st Sep 2021, 6:26 AM
The experiencer
The experiencer - avatar
0
Did u try solving this problem?
14th Jun 2021, 8:42 AM
Kirabo Ibrahim
Kirabo Ibrahim - avatar
0
60 minutes => 1 hour 1 minute => 1/60 hour 888 minutes => (888/60) hours
14th Jun 2021, 8:42 AM
TOLUENE
TOLUENE - avatar
0
3rd Aug 2021, 5:25 PM
Harikaran Kananathan
Harikaran Kananathan - avatar
0
Can i know the formula please
17th Aug 2021, 11:53 AM
Syekh Guntur Amara Putra
Syekh Guntur Amara Putra - avatar
0
guys when you use calculate and put 888/60=14.8 but this is not hours and min so you need to count 0.8 = how many minutes, so the answer is 14h 48min
18th Sep 2021, 11:52 PM
Kaneki
Kaneki - avatar
0
minutes = 888 hours = 60 print(minutes//hours) print(minutes%hours)
4th Dec 2021, 6:05 PM
Md. Rakibul Islam
Md. Rakibul Islam - avatar
0
n=888 h=int(n/60) m=n%60 print(h) print(m)
29th Dec 2021, 11:32 AM
Otmane ElHaddaji
Otmane ElHaddaji - avatar
- 1
Once I figured out the second line I was good> Thank you so much Guys :)
5th Dec 2021, 6:37 PM
David
- 2
Yes i solved this problem how to write in python
15th Jun 2021, 1:24 PM
Sambavi Lovely
Sambavi Lovely - avatar
- 4
By using floor division and module
15th Jun 2021, 1:24 PM
Sambavi Lovely
Sambavi Lovely - avatar