+ 1
I need help with my code, I’m new to this so please help to explain what I should do
Remember, there are 24 hours in a day, 60 minutes in an hour, and 60 seconds in a minute. Use the print() statement to output the result.
3 ответов
+ 3
I think it's "Python for beginners 3.2 practice"
The task is to display the number of seconds in a month, with some calculations it could be done.
Can you show your attempt first?
+ 1
You will get no help from the community if you don't show us your attempt, but we can help you in understanding the question better,
We know that 1 day=24hours
And, 1 hours=60 mins
that is, the total minutes in one day is 24*60? right?, ok
Now, 1 minute = 60 seconds
So, 1 day has 24*60*60 seconds, right?
Now we have calculated the seconds of one day now you can multiply it by 30 to get your answer simple!
0
Mulemwa Willington Mukela it should be like this:
def seconds_per_day(days):
hours = days * 24
minutes = hours * 60
seconds = minutes * 60
return seconds
print(seconds_per_day(30))