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
Who was the creator of the game Fnaf?
Lisa [10]
"Scott Cawthon" did that.........
8 0
3 years ago
Read 2 more answers
What is the wave speed of a wave that has a frequency of 100 Hz and a wavelength of 0.30m?
swat32

<u><em>Answer:</em></u>

<u><em>The speed is  </em></u>

<u><em>= </em></u>

<u><em>30 </em></u>

<u><em>m </em></u>

<u><em>s </em></u>

<u><em>− </em></u>

<u><em>1 </em></u>

<u><em> </em></u>

<u><em>Explanation: </em></u>

<u><em>The speed of a wave is given by </em></u>

<u><em> </em></u>

<u><em>speed </em></u>

<u><em>( </em></u>

<u><em>m </em></u>

<u><em>s </em></u>

<u><em>− </em></u>

<u><em>1 </em></u>

<u><em>) </em></u>

<u><em>= </em></u>

<u><em>frequency(Hz) </em></u>

<u><em>× </em></u>

<u><em>wavelength (m) </em></u>

<u><em> </em></u>

<u><em>The frequency is  </em></u>

<u><em>f </em></u>

<u><em>= </em></u>

<u><em>100 </em></u>

<u><em>H </em></u>

<u><em>z </em></u>

<u><em> </em></u>

<u><em>The wavelength is  </em></u>

<u><em>λ </em></u>

<u><em>= </em></u>

<u><em>0.3 </em></u>

<u><em>m </em></u>

<u><em> </em></u>

<u><em>The speed is </em></u>

<u><em> </em></u>

<u><em>v </em></u>

<u><em>= </em></u>

<u><em>λ </em></u>

<u><em>f </em></u>

<u><em>= </em></u>

<u><em>0.3 </em></u>

<u><em>⋅ </em></u>

<u><em>100 </em></u>

<u><em>= </em></u>

<u><em>30 </em></u>

<u><em>m </em></u>

<u><em>s </em></u>

<u><em>− </em></u>

<u><em>1 </em></u>

<u><em> </em></u>

<u><em></em></u>

<u><em></em></u>

<u><em></em></u>

6 0
3 years ago
The set of rules for how computers talk to one another
andrezito [222]
That is program ............
4 0
3 years ago
When you save a Notepad file for the first time, you must also A. print a copy for your records. B. give it a name. C. check the
Kruka [31]
Answer: Give it a name
3 0
3 years ago
Brief deacription of how hard drives have evolved
Zepler [3.9K]

Answer:

The first HDD was created by IBM in 1956 and was the size of a refrigerator. The total storage capacity was 5 MB and only two heads were used to read the disks. The 1970s offered a hard disk drive in much smaller shells with the ability to store roughly 60 MB.

Please Mark Brainliest If This Helped!

4 0
2 years ago
Other questions:
  • Retail price data for n = 60 hard disk drives were recently reported in a computer magazine. Three variables were recorded for e
    13·1 answer
  • Semiconductor memory is used mainly for primary storage even with its high cost. In another hand, the magnetic tape is the cheap
    6·1 answer
  • Does anybody know if that apple watch is actually worth what it costs?
    9·2 answers
  • - If we place records from different tables in adjacent____________, it would increase efficiency of a database.
    14·1 answer
  • This needs to be written in Java.
    11·1 answer
  • software that provides capabilities common across all organizations and industries is known as ________ software.
    15·2 answers
  • Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes f
    11·1 answer
  • 6, Answer the following questions.0<br>a What is software?​
    5·1 answer
  • What are the characteristics of calendar sharing options in Outlook 2016? Check all that apply.
    13·2 answers
  • Suppose the ESPN website uses 8-bit unsigned integers to store how many points a team has scored in
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!