how many seconds are in one month | Sololearn: Learn to code for FREE!

-7

how many seconds are in one month

am woking on my first python text, can you help!

3/1/2021 7:48:44 AM

Hil La

17 Answers

New Answer

+9

#each month is 30 days #each day is 24 hours #each hour is 60 minutes #each minute is 60 seconds print(30 * 24 * 60 * 60)

+7

month == 30 or 31 days, 28 or 29 if february day == 24 hours hour == 60 minutes minutes = 60 seconds so answer 30*24*60*60 print() is used in python, but #include is used in C/C++

+4

Hil La First show your attempts.

+4

maybe you are asking to produce output based on number of months, so you need to print(numberOfMonths*30*24*60*60) where numberOfMonth should be replaced with the variable name containing the... number of months ;)

+4

you cannot write such things.... == equality operator = assignement operator so, either: months = int(input()) days_per_month = 30 hours_per_day = 24 minutes_per_hour = 60 seconds_per_minute = 60 print(months*days_per_month*hours_per_day*mnutes_per_hour*seconds_per_minute) or: months = int(input()) print(months*30*24*60*60)

+4

seconds = 60 minutes = 60 hours = 24 # cd be input days = 30 # or 31 or 28 or 29 😉 cd be input month_seconds = seconds * minutes * hours * days print(month_seconds)

+3

use what I just said ;)

+2

thats not python tho

+2

i should not have included (#include stdio.h ) help me out

+2

thanks guys...but still am told ther is a bug in using Mohammad Sadra Shakouri way..

+2

Here is the original question. 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.

+2

and what's your line 1? (provide your full code, it would help)

+1

It's depend on which month you are choosing

0

"line 1 invalid syntax"

-1

month == 30 or 31 days, day == 24 hours hour == 60 minutes minutes = 60 seconds print('30 * 24 * 60 * 60 ')

-1

One month, 31 days, 744 hours, 44640 minutes, 2678400 seconds

-4

#include<stdio.h> print('how Many senconds are in a month?') print ('24 * 60 * 60 * 30')