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
When considering changing the content of a cell which button should you press to leave the cell as it originally was?
densk [106]
Esc key or cancel .........
7 0
3 years ago
Read 2 more answers
When a table is displayed in datasheet view, each column represents a select one:
Ksivusya [100]
The answer a. record in the table.
5 0
3 years ago
Use EBNF notation to describe the syntax of the following language constructs.
ZanzabumX [31]

Answer:

Following are the description to the given points:

Explanation:

To resolve basic design restrictions, EBNF has also been developed.This principle was its lack of support can identify repeatings easily. It implies that popular BNF models, like the description of a sequence of replicable elements, are complicated and rely on contra intuitive logical math.

To set a list of words divided by commas (e.g. john, coffee, logic) for instance, we would like to say something like "a list is a word accompanied by a few commas or terms." Through EBNF, they may say so. However, there have been no "many" alternatives in the standard BNF format. So, to describe something such as "a list is a term or a number accompanied by a pair with notation and script," you have to say the same thing. Which functions, although it is difficult, as it specifies a variety of lists instead of a specific list.

Essentially, "john, coffee, logic is John's list, accompanied by coffees or, and logic" would be the earlier link.  That's why in Option (a):

The return statement in Java is:

return ('”‘ (~[“] | ” [”e‘])*);

In option (c), it is the valid statement.

7 0
2 years ago
Consider the following statements. An abstract class is better than an interface when the variables in the abstract class or int
Ksivusya [100]
Well the nonchalant question given for 4th grade red named babyface Justin and Jerome
4 0
2 years ago
Which of the following correctly orders the investments from LOWER risk to HIGHER risk?
erma4kov [3.2K]

Treasury bond − Diversified mutual fund - Stocks.

An investment is an asset or item that is purchased with the hope that it will generate income or will appreciate in value. All investments involve some degree of risk. In finance, risk refers to the degree of uncertainty or potential financial loss that could happen in an investment decision.

In general, as investment risks rise, investors seek higher returns to compensate themselves for taking such risks. Relying on personal resources has more risk than relying on public resources of producers.

Usually, a portfolio made up of 60% stocks, 30% mutual funds, and 10% Treasury bonds would be considered to be the highest risk portfolio.

3 0
3 years ago
Other questions:
  • A url consists of a ____, a domain name, sometimes the path to a specific web page or location in a web page, and the web page n
    11·1 answer
  • Ooooooooooooooooooooooooooooh im blinded by the lightssssssssss
    11·1 answer
  • Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the us
    11·1 answer
  • To defragment a disk means to ____. slow it down, diagnose problems with it, reorganize it, repair it
    8·1 answer
  • .true or false? one disadvantage of cloudware is that it is never free<br> A. true<br> B. false
    12·1 answer
  • How do the principles behind the Agile Manifesto suggest approaching architecture?A. Architecture emergesB. Architecture is not
    10·1 answer
  • A(n ____ is information that a web server stores on a client computer, such as the client’s preferences when accessing a particu
    15·1 answer
  • I need help picture above
    8·2 answers
  • JUST NEED TO KNOW WHO ALL DOSE EDGINUITY
    12·2 answers
  • Why does computer uses 0s and 1s to procress data​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!