![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 04.05.2021 02:00, gibbss80stu
Your friend is writing a program that will allow the user to input a year and then print “LEAP!” if that year is a leap year or print “not a leap year” if it is not. However, the program isn’t working properly, and your friend asked you for help in debugging.
Before you take a look at the program, you should know these rules for leap years:
A year is a leap year if it can be divided by 400 without a remainder.
A year is a leap year if it can be divided by 4 without a remainder, unless it can also be divided by 100 without a remainder; if that is the case, it is not a leap year.
All other years are not leap years.
Here is your friend’s code:
year=int(input()
if year%400=0:
print("LEAP!")
else:
print(not a leap year")
elseif year%4==0 and year%100!=0
print(“not a leap year")
![answer](/tpl/images/cats/otvet.png)
Answers: 1
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:00, shawnnoteman1234
Which task uses a simple parameter?
Answers: 1
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 25.06.2019 06:20, joe7977
If you want to change the speed of a layer's horizontal scrolling, what should you change? a. the x coefficient b. the y coefficient c. the virtual width d. the order of the game's layers select the best answer from the choices provided
Answers: 2
Do you know the correct answer?
Your friend is writing a program that will allow the user to input a year and then print “LEAP!” if...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 17.02.2021 06:10
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 17.02.2021 06:10
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 17.02.2021 06:10
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/istoriya.png)