Answered step by step
Verified Expert Solution
Question
1 Approved Answer
def calculate _ weekday ( first _ day _ weekday, day _ of _ year,is _ leap _ year ) : if is _ leap
def calculateweekdayfirstdayweekday, dayofyear,isleapyear:
if isleapyear and dayofyear :
dayofyear
weekdaynumber firstdayweekday dayofyear
return weekdaynumber
def getuserinput:
firstdayweekday intinputEnter the weekday number of the first day of the year :
dayofyear intinputEnter the day number of the year :
return firstdayweekday, dayofyear
def main:
year intinputwhat year is it
firstdayweekday, dayofyear getuserinput
weekdaynumber calculateweekdayfirstdayweekday, dayofyear,year
printfThat will be weekday number: weekdaynumber
main
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started