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
V125BC [204]
3 years ago
15

python A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around 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.
Computers and Technology
2 answers:
Lesechka [4]3 years ago
4 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:

e-lub [12.9K]3 years ago
3 0

Answer:

// program in Python.

#read year

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

#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:

Read year from user and assign it to variable "year".If year is completely divisible by 4 and not divisible by 100 or year is completely divisible by 400 then year is leap year otherwise year is not a leap year.

Output:

Please Enter a year:2003                                                                                                          

2003 is not a leap year.

You might be interested in
Which of these are correctly formatted Python dictionaries? Check all that apply. dict = {‘Name’: ‘Matthew’, ‘Age’: 14, ‘School’
Advocard [28]

Answer:

A. dict = {‘Name’: ‘Matthew’, ‘Age’: 14, ‘School’: ‘ABC School’}

Explanation:

Since <em>python does not use type when declaring a variable</em>, you must make sure you make your variables correctly or else it won't compile correctly. Lists use braces[]; Strings use quotes, "" or ''; Integers are just declared with a number(s); Dictionaries use brackets{} and inside are <u>attributes of something</u>. For instance, you can use dictionaries to describe ages, {'"Bryan": 6, "Alex": 13, etc.} <u>Sort of like a json file</u>. Dictionaries also tend to use <u>uppercase letters</u> when describing something. The only answer that has all the attributes correct is A. dict = {‘Name’: ‘Matthew’, ‘Age’: 14, ‘School’: ‘ABC School’}

hope i helped :D

7 0
3 years ago
Read 2 more answers
What project started the development of inter-network connections using tcp/ip that has evolved into the internet today.?
rosijanka [135]
Dial Up, help start it
3 0
3 years ago
suppose task c has two predecessor tasks: task a and task b. task a ends on may 8 and task b ends on may 13. when can task c beg
san4es73 [151]

Suppose task c has two predecessor tasks: task a and task b. task a ends on may 8 and task b ends on may 13. The time that task c can  begin is may 14.

<h3>What does task mean in its other sense?</h3>

It is seen as Assignment, chore, duty, job, and stint are a few examples of common synonyms for task. Task implies work that is imposed by a person in authority, an employer, or circumstances, even though all of these words mean "a piece of work to be done."

Note that you may be asked to write a letter, a feature article, an editorial, or a speech. who you're pretending to write to in response to the prompt. Hence starting by on the 14th is advisable.

Learn more about task  from

brainly.com/question/12831236
#SPJ1

8 0
1 year ago
20 points
riadik2000 [5.3K]
By the year 2030, artificial intelligence (A.I.) will have changed the way we travel to work and to parties, how we take care of our health and how our kids are educated.
3 0
3 years ago
Read 2 more answers
Elements such as page parts and calendars are easily inserted by navigating to the _____ grouping. Building Blocks Illustrations
yaroslaw [1]

Answer:

Building Blocks

Explanation:

When referring to the Publisher Application the navigation feature that allows you to do this is the Building Blocks feature. Like mentioned in the question this feature allows you to choose from and insert a predefined set of calendars for insertion into a publication as well as insert a variety of other page parts to better customize the feel of the publication.

6 0
3 years ago
Other questions:
  • Wendy Patel is entering college and plans to take the necessary classes to obtain a degree in architecture. Research the program
    12·1 answer
  • What is the most useful advantage of using the Slide Sorter view to rearrange slides instead of using the slide thumbnails in No
    5·1 answer
  • Easy question how the internet has impacted y’all life
    13·1 answer
  • Fill in the blanks:(a)Every Java program must have at least one ______________.(b)The Java program is executed from _________ me
    12·1 answer
  • The global network that links millions of computers is the
    9·2 answers
  • (1) Prompt the user for a string that contains two strings separated by a comma. (1 pt) Examples of strings that can be accepted
    13·1 answer
  • Which of the following statements opens the file info.txt for both input and output? a) dataFile.open("info.txt", ios::in &amp;&
    11·2 answers
  • During prereading, it is not important to pay attention to visual aids.<br> T f
    15·2 answers
  • Which two options are negotiated via ncp during the establishment of a ppp connection that will use the ipv4 network layer proto
    7·1 answer
  • 1. If you have the following device like a laptop, PC and mobile phone. Choose one device
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!