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
Ratling [72]
2 years ago
15

Write a program for determining if a year is a leap year. In the Gregorian calendar system you can check if it is a leaper if it

is divisible by 4 but not by 100 unless it is also divisible by 400.
Computers and Technology
1 answer:
SOVA2 [1]2 years ago
8 0

Answer:

def leap_year_check(year):

return if int(year) % 4 == 0 and (int(year) % 100 != 0 or int(year) % 400 == 0)

Explanation:

The function is named leap_year_check and takes in an argument which is the year which we wish to determine if it's a new year or not.

int ensures the argument is read as an integer and not a float.

The % obtains the value of the remainder after a division exercise. A remainder of 0 means number is divisible by the quotient and a remainder other wise means it is not divisible by the quotient.

If the conditions is met, that is, (the first condition is true and either the second or Third condition is true)

the function leap_year_check returns a boolean ; true and false if otherwise.

You might be interested in
Choose the answer that best completes the
Fiesta28 [93]

Answer:

the information processing cycle

Explanation:

3 0
3 years ago
Read 2 more answers
What should you use as the argument for the goto() command?
Soloha48 [4]
D. The X and Y coordinates of a point 

goto(21,60)

will make the turtle go to that specific location.
7 0
3 years ago
Using Gen/Spec, classes can be organized by using a peer-to-peer inheritanc True/false
Fiesta28 [93]

Answer: True

Explanation: Gen/Spec is the known as the general specification standard for the classes.This standard helps in bringing out the peer-to-peer relations of class.

Gen/Spec is used in class diagram because it helps in the display of the access sharing and class specification in the general form for the required instances.Thus, this standard helps in the enhancement of the class diagram and its inheritance. So, the statement given in the question is true.

5 0
3 years ago
What is the trade-offs in time complexity between an ArrayList and a LinkedList?
AURORKA [14]

Answer:

  In the time complexity, the array-list can easily be accessible any type of element in the the given list in the fixed amount of time.

On the other hand, the linked list basically require that the list must be traversed from one position to another end position.

The Array-List can get to any component of the rundown in a similar measure of time if the file value is know, while the Linked-List requires the rundown to be crossed from one end or the other to arrive at a position.

4 0
3 years ago
Which type of packet is sent by a dhcp server after receiving a dhcp discover message?
emmasim [6.3K]
A<span> DHCPOffer packet is sent to the client.</span>
5 0
3 years ago
Other questions:
  • To name a computed field, follow the computation with the word ____ and then the name you wish to assign to the field
    8·1 answer
  • Multiple users report that the network printer, which is connected through the print server, is not printing. Which of the follo
    12·1 answer
  • CNG and gasoline-powered vehicles use the same internal combustion engine, but different fuel types. A) True B) False
    8·2 answers
  • What are some of the issues that organizations need to be aware of when designing and managing data?
    8·1 answer
  • Of the sequences listed below, which shows the correct order of the steps in the incident management workflow: (1) authenticate
    14·1 answer
  • Is this a Bad Cpu processor ? I need some.help ASAP I turn on my.pc and it has no display but everything is on fans and the you
    13·1 answer
  • Create a Python program that: Allows the user to enter a person's first name and last name. The user should be able to enter as
    12·1 answer
  • Question is in photo
    11·1 answer
  • Which properties would be useful to know to search for a Word document? Check all that apply.
    7·1 answer
  • Which one of the statements best characterizes the current state of e-commerce?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!