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
Laws differ from theories because laws do not provide
AveGali [126]
Laws differ from theories because laws do not provide an explanation for how things work or could possibly work. A law describes what happens or needs to happen under certain conditions. A law can predict what will happen as long as those conditions are met. <span>For the purposes of this discussion, a "law" is a rule that has been formalised by repeated testing. It is also a generalisation. A theory, on the other hand, is an explanation for an observation that is supported by a large body of evidence. </span>
7 0
3 years ago
Make three statements about technology
Ivan

Technology is a useful tool for research. It is how we drive around. Technology is important for medicinal purposes.


lol

4 0
3 years ago
NumA=2<br> for count range (5,8)<br> numA=numA+count <br> print(numA)
love history [14]

Answer:

for count in range (5,8): numA=numA+count print(numA)

Explanation:

7 0
3 years ago
In a block-style business letter, the paragraphs are double-spaced and indented. <br> True or False
Sav [38]
I am pretty sure it is true
5 0
3 years ago
Read 2 more answers
In Mandatory Access Control sensitivity labels attached to object contain what information?
larisa86 [58]

Answer:b)The item’s classification and category set

Explanation: Mandatory access control(MAC) is the security component in the computer system. It is regarding the controlling the access of the operating system by the administrator.The accessing is made limited by the MAC according to the sensitivity of the data .

The authorization for user to access the system is based on this sensitivity level known sensitivity label. The objects contain the information regarding the classification and categories or level of items. Thus, the correct option is option(b).

7 0
3 years ago
Other questions:
  • Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending whe
    12·1 answer
  • Which of the following information is most important to include in a timeline?
    14·1 answer
  • This is not school related in anyway but. I used to play this videogame on my computer years ago, but i cannot remember the name
    13·2 answers
  • A matrix representation stores matrices such that the offset address of the element in row i and column j can be calculated by c
    12·1 answer
  • Sarah, a computer user, tells James, a computer technician, that the network she is connected to is running too slowly. Which of
    5·1 answer
  • Convert the following pseudi code to C++ code. BE sure to define the apprpriat evariables.
    9·1 answer
  • Big Project, Giving 5 stars, a Thanks, 80 points, and Branliest to whoever answers them correctly
    9·2 answers
  • Write a python program that should determine from the range you choose to enter :
    9·1 answer
  • I'm trying to move the figure a little away from, the column line and every time I move it and click ok it goes back to being be
    11·1 answer
  • Do anyone else receive random points from Brainly… because I swear I had like 2K+ something and I check and Im at ACE… and with
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!