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
How to get someone off your best friends list without blocking them
Paraphin [41]

Answer:

Which website

Explanation:

6 0
3 years ago
This is the question
nikdorinn [45]

Answer:

I dont know it sorry

Explanation:

i would help u

4 0
3 years ago
Marly is using her smartphone to review a webpage that she created. The formatting and alignment of webpage elements is incorrec
Margaret [11]

Answer:

She needs a responsive design

Explanation:

The website needs to detect what kind of device the user is using. It could be by the window size (not very accurate), or a piece of code to figure out the device being used. Once it knows what device is being used, and the size of the page, it should change its layout to fit the design.

3 0
3 years ago
Please select the word from the list that best fits the definition
ElenaW [278]

bro what thats rly vague?

6 0
3 years ago
Read 2 more answers
You must have an active ____ to test external links.
charle [14.2K]
Network & internet connection
4 0
4 years ago
Other questions:
  • You need to install an RODC in a new branch office and want to use an existing workgroup server running Windows Server 2012 R2.
    10·1 answer
  • b) Derive the logic expressions for the incrementor and 7-sgement decoder. Since software can perform gate-level optimization, y
    7·1 answer
  • Can you shoot video on the Olympus E-410?
    12·2 answers
  • James would like to send a document he has saved on the hard drive to coworkers in Ireland, Brazil, and India. These coworkers h
    6·2 answers
  • Sixteen stations, numbered 1 through 16, are contending for the use of a shared channel by using the adaptive tree walk protocol
    7·1 answer
  • What are some other ways to program a robot to navigate a complicated environment other than straight paths and right angle (90
    8·2 answers
  • Ano ang dalawang paraan sa paggawa ng abono?​
    6·1 answer
  • Which of the following describe audio-editing software? Choose all that apply.
    5·2 answers
  • Which of the following variables are string types?
    10·1 answer
  • What are the dominant InfoSec-related credentials used to document knowledge and/or experience?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!