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
Y_Kistochka [10]
3 years ago
11

2.13 LAB: Branches: Leap Year

Computers and Technology
1 answer:
Neporo4naja [7]3 years ago
5 0

Answer:

The program in Python is as follows:

year = int(input("Enter a year: "))

print(year,end=" ")

if year % 4 == 0:

  if year % 100 == 0:

      if year % 400 == 0:           print("is a leap year")

      else:           print("is not a leap year")

  else:       print("is a leap year")

else:   print("is not a leap year")

Explanation:

This gets input for year

year = int(input("Enter a year: "))

This prints year, followed by a blank

print(year,end=" ")

If year is divisible by 4

if year % 4 == 0:

If yes, check if year is divisible by 100

  if year % 100 == 0:

If yes, check if year is divisible by 400; print leap year if true

      if year % 400 == 0:           print("is a leap year")

print not leap year if year is not divisible by 400

      else:           print("is not a leap year")

print leap year if year is not divisible by 100

  else:       print("is a leap year")

print leap year if year is not divisible by 4

else:   print("is not a leap year")

You might be interested in
1.which screen appears after the password is typed (welcome, lock)​
jenyasd209 [6]

Answer:

it should be the welcome screen I will hope so lol

4 0
2 years ago
Read 2 more answers
Power brakes:
IgorLugansk [536]
The answer is B becausePower brakes are a system of hydraulics used to slow down or stop most motor vehicles. It uses a combination of mechanical components to multiply the force applied to the brake pedal by the driver into enough force to actuate thebrakes and stop a vehicle that can weigh several tons.
5 0
3 years ago
Read 2 more answers
Suppose that the following elements are added in the specified order to an empty binary search tree: Lisa, Bart, Marge, Homer, M
Alecsey [184]

Answer:

Pre-order: Lisa, Bart, Homer, Flanders, Marge, Maggie, Smithers, Milhouse

In-order: Bart, Flanders, Homer, Lisa, Maggie, Marge, Milhouse, Smithers

Post-order: Flanders, Homer, Bart, Maggie, Milhouse, Smithers, Marge, Lisa

Explanation:

The required orders are mentioned.

4 0
3 years ago
What is a computer that provides services and connections to other computers on a network is called a ________ ?
melisa1 [442]
They are called servers .. you can also call them hosts
6 0
3 years ago
The website of an international human rights organization stores a large database of information and provides search functionali
pishuonlain [190]

Answer:

False

Explanation:

This statement is false because International human rights stores large database so its search functionality is not limited to the website.

8 0
3 years ago
Other questions:
  • the task is to ask the user for three numbers and find the average which pseudocode gives you the comment outline for task​
    10·1 answer
  • Face book requires you to change your password regularly<br> a. TRUE<br> b. FALSE
    14·1 answer
  • You want to use a wireless keyboard and mouse with your laptop computer. which method should you use
    11·1 answer
  • Gabriel needs to create a formula that does not change when it is copied to cell b2. which formula should he create?
    14·1 answer
  • Match each career with the education required for each job
    12·1 answer
  • A small, electronic chip that a manufacturer develops for use in another product (such as a digital camera or microwave oven) is
    11·2 answers
  • 4.17 LAB: Varied amount of input data ( C++)
    5·1 answer
  • Virus warning don’t go on bit l y links it’s a virus
    12·2 answers
  • There is a file of a few Sean Connery movies on the internet. Each entry has the following form:
    9·1 answer
  • Innovation made from establishment of abucas to the present 5th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!