0

I tried my own but it shows error

Random task! You need to calculate the number of hours in 888 minutes. Your program needs to output the number of hours and then the number of remaining minutes, on separate lines. For example, 72 minutes are equal to 1 hour and 12 minutes, so your program would output: 1 12 https://code.sololearn.com/cV1cPSQysQyd/?ref=app I know answer of this question , but I just simply tried input() in this code it shows error why?🤔🤔🤔🤔🤨🤨🤨

3rd Sep 2021, 9:30 AM
Thasneem Mohamed
Thasneem Mohamed - avatar
5 Respostas
+ 4
You need to change the input to integer by using int(). input() take input as String. t=int(input())
3rd Sep 2021, 9:35 AM
Vadivelan
+ 4
Your code is a perfect place to use the built-in Python function divmod().
3rd Sep 2021, 11:59 AM
David Ashton
David Ashton - avatar
+ 1
Thasneem Mohamed It sounds like you have a syntax problem, not a logic problem. As Vadivelan stated, we can't really help you if we can't see your code. If you don"t know how to post your code, then please lrt us know
3rd Sep 2021, 9:35 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Superb vadivelan bro😘👏👏👏👏
3rd Sep 2021, 9:38 AM
Thasneem Mohamed
Thasneem Mohamed - avatar
+ 1
t = int(input()) h = 60 H = (t//h) #hours print(H) M = (t%h) #Minutes print(M)
5th Sep 2021, 6:47 AM
Patel