Computers and Technology

[10 marks] The function leap n, which takes an integer n as input, and returns True if the year n is a leap year, and False otherwise. Leap years are those that are evenly divisible by 4, except any year that is also evenly divisible by 100 unless that year is also evenly divisible by 400. So, for example, 1996, 2012, and 2020 are all leap years, but 2100, 2200, and 2300 are not leap years, because although they are all evenly divisible by 4, they are also evenly divisible by 100. However, 1600, 2000, and 2400 are leap years, because although they are divisible by 100, they are also divisible by 400. The Haskell interaction may look like: > leap 1996 True > leap 2000 True > leap 2100 False

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, qveenvslayin
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
image
Computers and Technology, 24.06.2019 21:00, Winzen07
Which device has the most limited computing functionality?
Answers: 1
image
Computers and Technology, 24.06.2019 21:50, carter4026
The use of phrases, fragments, and punctuation can influence the mood of a passage; keeping this in mind, how would you describe the mood of the followingpassage? "fog on the essex marshes, fog on the kentish heights, fog creeping into the cabooses of collier-brigs; fog lying out on the yards, and hovering in the riggingof great ships; fog drooping on the gunwales of barges and small boats. fog in the eyes and throats of ancient greenwich pensioners, wheezing by thefiresides of their wards; fog in the stem and bowl of the afternoon pipe of the wrathful skipper; fog cruelly pinching the toes and fingers of his shivering little'prentice boy on deck." (5 points)
Answers: 2
image
Computers and Technology, 24.06.2019 23:30, etzzz32561
Which example can be considered master data in an organization? a. holiday list b. dress code c. employee information d. recreational activities
Answers: 1
Do you know the correct answer?
[10 marks] The function leap n, which takes an integer n as input, and returns True if the year n is...

Questions in other subjects:

Konu
Mathematics, 29.10.2020 02:10
Konu
Spanish, 29.10.2020 02:10
Konu
English, 29.10.2020 02:10