Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

For Review: I mocked up "Exercise OPT.1 – Zeller’s Algorithm"

MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
I got my questions answered at in under 10 minutes. Go to now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer


To see the expert answer you'll need to create a free account at Brainly

Seems I forgot December in my code. :)
One bore bug found/fixed. The else statements were allowing the user to bypass the checks.
My third debug. There was an issue in the month section that would go into an infinite loop if you had a 2-digit number that was outside of the standard 1-12 range. Hopefully this is it.

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

This is Python 3, right?
It is, yes.
Reading this impresses on me the need to control input. The vast majority of your code is making sure users give you input your code can use. That's a good lesson. The version I wrote works only when the user knows what to enter.
It is worth noting that I started with code very similar to yours. Only once I had the underlying logic working did I start to explore the input control.
That's a lot of input control. My design goal was to get this over with and I typo at a fairly high rate, and so I skipped the input checking and went with ease of input. For the initial coding, I set strings to month, day, and year. Here's a link to my Python 3 answer, if you want to compare input styles. (and I wanted to test posting a link to code :-)
My attempt is here: The main bug I encountered was forgetting how the slicing indices relate to the spaces between elements.
Finally had some free time to start catching up. Here is mine, without error checking.

Not the answer you are looking for?

Search for more explanations.

Ask your own question