write a Python program that asks the user the day number in a year in the range 2 to 365 and ask the first day of the year Sunday or Monday or Tuesday acceptor then the program should display the day on the day number that has been input!!!
Need help guys !!!!
Anonymous:
___k off
Answers
Answered by
5
Answer:
Explanation:
X= input(what is the number of days in a year)
If x==365
Print("your answer is absolutly correct")
Ifelse x==365
Print("wrong Answer")
Answered by
9
The code is,
def day_of_the_week(y,m,d) :
t = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
if (m < 3) : y = y - 1
return (y + y // 4 - y // 100 + y // 400 + t[m - 1] + d) % 7
day = 28
month = 4
year = 2019
print(day_of_the_week (year,month,day))
--------------*-----------------
Sunday=0
Monday=1
Tuesday=2
Wednesday=3
Thursday=4
Friday=5
Saturday=6
You modify Day,Month,Year.
def day_of_the_week(y,m,d) :
t = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
if (m < 3) : y = y - 1
return (y + y // 4 - y // 100 + y // 400 + t[m - 1] + d) % 7
day = 28
month = 4
year = 2019
print(day_of_the_week (year,month,day))
--------------*-----------------
Sunday=0
Monday=1
Tuesday=2
Wednesday=3
Thursday=4
Friday=5
Saturday=6
You modify Day,Month,Year.
Similar questions