subject

My code get an input of 1900 and it should output not a leap year but it fails first line of code. It should output not a Leap any number with 1500 not divisble by 4 with/out a remainder should output (not a leap year. ) input_year = int(input())

if input_year % 4 == 0: #fails on this step, 1900 should be false
print(input_year, "- is Leap Year")

elif input_year % 100 == 0:
print(input_year, "- leap year")

elif input_year % 400 ==0:
print(input_year, "is a leap year")

else:
print(input_year, "- not a leap year")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 24.06.2019 07:50
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u.s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
You know the right answer?
My code get an input of 1900 and it should output not a leap year but it fails first line of code. I...
Questions
question
Mathematics, 01.06.2021 21:00
question
Mathematics, 01.06.2021 21:00
Questions on the website: 13722363