1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lilit [14]
3 years ago
5

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. NOTE

: Please provide function declaration [2 marks]. 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
Computers and Technology
1 answer:
vesna_86 [32]3 years ago
7 0

Answer:

Explanation:

The following code snippet is a leap year checker written in Haskell which checks to see if the year is a leap year and then outputs a boolean value.

isDivisibleBy :: Integral n => n -> n -> Bool

isDivisibleBy x n = x `rem` n == 0

leap_n :: Integer -> Bool

leap_n year

 | divBy 400 = True

 | divBy 100 = False

 | divBy   4 = True

 | otherwise = False

where

  divBy n = year `isDivisibleBy` n

You might be interested in
Potential Energy and Kinetic Energy both mean "energy in motion" True or False​
Irina18 [472]

Answer:

false

Explanation:

pretty sure energy in motion is only for kinetic energy

4 0
3 years ago
Read 2 more answers
Input two numbers and print their sum products difference division and remainder​
likoan [24]

\tt n1=int(input("Enter\: first\:no:"))

\tt n2=int(input("Enter\: second\:no:"))

\tt sum=n1+n2

\tt diff=n1-n2

\tt pdt=n1*n2

\tt div=n1//n2

\tt rem=n1\%n2

\tt print("Sum=",sum)

\tt print("Difference=",diff)

\tt print("Product=",pdt)

\tt print ("Division=",div)

\tt print("Remainder=",rem)

Output:-

Enter first no:4

Enter second no:3

Sum=7

Difference=1

Product=12

Division=1

Remainder=1

7 0
3 years ago
What kind of negative social impact has wireless communications had on today's society?
Zarrin [17]
Kind of negative social impact has had today is debates on social networking and dating and wireless communications are destroying kids from ages 12-16 these 21st century devices are frying are worlds society.
5 0
4 years ago
Read 2 more answers
Focusing on the general characteristics of a problem or object, while ignoring the details, is a technique called
Taya2010 [7]

Answer:

Abstraction

Explanation:

In computer science, abstraction has a similar definition. It is a simplified version of something technical, such as a function or an object in a program. The goal of "abstracting" data is to reduce complexity by removing unnecessary information. At some level, we all think of computers in abstract terms.

5 0
3 years ago
What does UDP stand for?
sleet_krkn [62]
User Datagram Protocol
3 0
3 years ago
Read 2 more answers
Other questions:
  • The technology (software) that automatically downloads website information to your computer is called ________.'
    15·1 answer
  • I need help making this table in html code I have some of chart done but idk where to go after the 6:30pm part
    13·1 answer
  • How do you uninstall sc update?
    13·2 answers
  • Heelo how do u do python syntax lesson 11 on code academy
    12·1 answer
  • What are two example of ways an electronic record may be distributed to others?
    11·1 answer
  • 9. The voltage of a replacement capacitor must
    11·1 answer
  • Which is the last step in conducting a URL search?
    14·2 answers
  • The command-line interface tells a user that it's ready to receive commands by displaying a specific set of characters called a(
    12·1 answer
  • Match each proofreading mark to the expected result.
    10·1 answer
  • In the following nested loop structure, which loop does the program EXIT first?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!