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
ROM is designed for _________
Sidana [21]
Computer Instructions

ROM, or Read Only Memory is used to store instructions as it retains memory even after power loss.
6 0
3 years ago
The ________ tier of the three-tier architecture consists of computers, phones, and other mobile devices that have browsers that
andrey2020 [161]

Answer:

It is the user tier of the 3-tier architecture that consists of computers, phones, and other mobile devices that have browsers that request and process web pages.

Explanation:

Almost if not all applications that use e-commerce for operations use the 3-tier architecture.  3-tier architecture is simply the arrangement of server tier which consists of all computers that run a web server and a database tier that consists of computers that run a DBMS to store and retrieve data. We also have the user data that consists of computers, phones, and other mobile devices that have browsers that request and process web pages.

When you make a request, for instance to Google in your local browser, the browser sends a request to the internet. This initial interaction between the user and the internet is what is known as the user tier of the 3 tier architecture. Basically, it is the phase where end users access content online through graphical interface browsers and make requests to the web servers and DBMS.

Learn more about 3-tier architecture

brainly.com/question/12627823

#LearnWithBrainly

6 0
3 years ago
What are common tasks Human Services workers perform? Check all that apply.
Ainat [17]

Answer: B, D, E, F

Explanation:

I got I right.

7 0
3 years ago
Read 2 more answers
An electronic cover letter should be
Lunna [17]
A cover letter is a document sent with your resume to provide additional details about you. The cover letter is what introduces your resume and you. 
<span>A few short tips for writing cover letters. i dont know if thats the answer you looking for</span>
3 0
3 years ago
Read 2 more answers
How to copy and paste using keyboard onchromebook?
Diano4ka-milaya [45]
The copy combination is "ctrl+c". Highlight the text, go to where you want to paste it to, and use the combinations "ctrl+v".
5 0
3 years ago
Other questions:
  • A collection of related instructions organized for a common purpose is referred to as
    6·2 answers
  • Which type of chemical bonds are formed by sharing electrons?
    11·1 answer
  • Which of the following for-loop headers results in equivalent numbers of iterations: A. for (int q = 1; q &lt;= 100; q++) B. for
    12·1 answer
  • which software is used to mimic intricate hand drawings into digital paintings? _____ is used to replicate hand drawings into di
    7·1 answer
  • Validating the results of a program is important to a. correct runtime errors b. make sure the program solves the original probl
    8·1 answer
  • What was your learning target for today
    9·2 answers
  • WHAT DOES INFORMATION TECHNOLOGY DO??<br> Do they offer services or products
    15·1 answer
  • How many days till earth ends
    12·1 answer
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
  • List four tasks that humans perform frequently, but which may be difficult for a computerized agent to accomplish. Describe the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!