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
BARSIC [14]
3 years ago
6

3.26 LAB: Leap Year A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate a

round the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are: 1) The year must be divisible by 4 2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400 Some example leap years are 1600, 1712, and 2016. Write a program that takes in a year and determines whether that year is a leap year. Ex: If the input is: 1712 the output is: 1712 - leap year
Computers and Technology
2 answers:
Tju [1.3M]3 years ago
8 0

Answer:

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

if (year % 4) == 0:

  if (year % 100) == 0:

      if (year % 400) == 0:

          print(str(year) + " - leap year")

      else:

          print(str(year) +" - not a leap year")

  else:

      print(str(year) + " - leap year")

else:

  print(str(year) + "- not a leap year")

Explanation:

*The code is in Python.

Ask the user to enter a year

Check if the <u>year mod 4</u> is 0 or not. If it is not 0, then the year is not a leap year. If it is 0 and if the <u>year mod 100</u> is not 0, then the year is a leap year. If the <u>year mod 100</u> is 0, also check if the <u>year mod 400</u> is 0 or not. If it is 0, then the year is a leap year. Otherwise, the year is not a leap year.

castortr0y [4]3 years ago
6 0

Answer:

i_year=int(input(""))

#check leap year

if((i_year % 4 == 0 and i_year % 100 != 0) or (i_year % 400 == 0)):

  print("{} is a leap year.".format(i_year))

else:

  print("{} is not a leap year.".format(i_year))

Explanation:

You might be interested in
Blank Are input instructions you give to a computer
kotegsom [21]

Explanation:

A computer is a machine that can be programmed to accept data (input), process it into useful information (output), and store it away (in a secondary storage device) for safekeeping or later reuse. The processing of input to output is directed by the software but performed by the hardware.

4 0
2 years ago
30 POINTS FOR THE CORRECT ANSWER
Nonamiya [84]

In the case above, Ruben  should consider the printing option below:

  • Offset litho printing.
  • Digital Printing.
  • Screen printing.

<h3>What is the best printing type for books?</h3>

The use of digital printing is known to be the best in the case with Ruben. It is said to be much more economical in terms of shorter print runs.

Note that Digital printing do have fast turnaround time and as such it is better for books.

Therefore, In the case above, Ruben  should consider the printing option below:

  • Offset litho printing.
  • Digital Printing.
  • Screen printing.

Learn more about printing from

brainly.com/question/145385

#SPJ1

5 0
1 year ago
Andreas wants to insert an element into an email that will graphically display the values in a table. Which option should he cho
Montano1993 [528]

Answer:

D. chart

Explanation:

Correct on edg

5 0
3 years ago
Consider the unsigned decimal number 35. What is the value in hexadecimal?<br><br> 1. 3510 = ____ 16
Liula [17]

Answer:

23_{16}

Explanation:

When we convert any decimal number into the hexadecimal number we have to divide that number with 16.

Now according to question the decimal number is 35.

Now to convert this in hexadecimal divide it with 16.

\frac{35}{16} =2\frac{3}{16}

This means the quotient is 2 and the remainder is 3.

Therefore the value of hexadecimal is,

23_{16}

Therefore,

35_{10}=23_{16}.

 

8 0
3 years ago
Help me find the right answer please.
timama [110]

Answer:

I'm not sure

Explanation:

I'm good at math but I do not see any numbers to work with. SORRY

5 0
3 years ago
Other questions:
  • If the current through a heater coil is 5 amp and the supply voltage is 120 volts, the coil resistance is A. 0.04 ohm. B. 24 ohm
    6·1 answer
  • If you have machines doing jobs, fewer staff are needed, therefore costs are
    5·2 answers
  • Which tab is used to edit objects on the slide master and layouts
    10·1 answer
  • Which of the following statements is false? a. A class can directly inherit from class Object. b. If the class you're inheriting
    14·1 answer
  • Can you combine a wireless and wired lan in the same home
    14·1 answer
  • NEED BY 15 MINUTES PLEASE! WILL MARK BRAINLIEST!You can create special effects in an image using a camera or a photo-editing too
    5·1 answer
  • Which button would you use to insert a downloaded video clip on your computer into a slide?
    15·2 answers
  • Which of the following demonstrates the proper way to specify a variable-length argument list?
    7·1 answer
  • State differences between title bar and menu bar​
    5·1 answer
  • A(n) ____ is a web-based repository of information that anyone can access, contribute to, or modify.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!