Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How can I get this for loop to run in python? I've tried it several different ways but the solution's I've come up with involve

How can I get this for loop to run in python? I've tried it several different ways but the solution's I've come up with involve a lot more than just filling in the "?????" spots. Any help would be appreciated.

image text in transcribed

# Our Goal: print out the 366 days in 2020 # 2020/1/1 # 2020/1/2 and so forth # Run Cell Run Above Debug cell dowt = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat') # day-of-week-tuple year = 2020 cnt = 3 # 2020/1/1 is a Wednesday, so let us start a counting index of 3 for Wednesday, and keep adding one, m = 0 # this will be a variable to be looped through eventually. I use the convention of 011 for the twelve months month = m+1 # this is the month to be displayed/printed. The way it is set up now, it will NOT change automatically #when you change the value of m. Beware of that. maxdays = 7 # this variable will be conditional on the month eventually. Right now, just try 7 # write a for loop, to print out the day value # fill in the ?????? for d in ????? : day = d+1 print(?????)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions