Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Leap Year Issue
#4
At line 6 you check to see if the year matches a leap year. But what happens if it doesn't? Since there's no else clause for that if, it just falls past the block to the end of the while.

The while loop runs again, but without changing the year. So it just tests over and over again.
Reply


Messages In This Thread
Leap Year Issue - by spalisetty06 - Jul-02-2020, 12:04 PM
RE: Leap Year Issue - by Larz60+ - Jul-02-2020, 03:05 PM
RE: Leap Year Issue - by pyzyx3qwerty - Jul-02-2020, 03:16 PM
RE: Leap Year Issue - by bowlofred - Jul-02-2020, 03:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to get year not the entire year & time mbrown009 2 938 Jan-09-2023, 01:46 PM
Last Post: snippsat
  Problem with module time and leap seconds Pedroski55 3 1,310 Oct-07-2022, 11:27 PM
Last Post: Pedroski55
Photo Algorithm for leap year (structogramm coder_sw99 3 2,288 Jul-23-2021, 02:13 PM
Last Post: DeaD_EyE
  Leap Year MartinEvtimov 14 25,416 Mar-10-2017, 01:46 AM
Last Post: Larz60+
  leap year program issue jashajmera 3 3,968 Feb-04-2017, 11:51 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020