ScratchData LogoScratchData
Back to jkibbe's profile

T$C - Leap Year Calculator

JKjkibbe•Created March 1, 2017
T$C - Leap Year Calculator
0
0
17 views
View on Scratch

Instructions

Did you know that a leap year does not every 4th year, all the time. There are exceptions to this rule since a year is 365.242199 days, not 365.25 days. Create a calculator that determines if a given year is a leap year. Assume a whole number 1-10000 is entered. Here's the Wikipedia pseudocode for how to make the adjustment: if (year is not divisible by 4) then (it is a common year) else if (year is not divisible by 100) then (it is a leap year) else if (year is not divisible by 400) then (it is a common year) else (it is a leap year)

Description

read more https://en.wikipedia.org/wiki/Leap_year Test Cases: 1900 not a leap year 2000 leap year 2004 leap year 2012 leap year 2020 leap year 2100 not a leap year

Project Details

Project ID147763778
CreatedMarch 1, 2017
Last ModifiedMarch 7, 2017
SharedMarch 1, 2017
Visibilityvisible
CommentsAllowed