Program:-
Output:-
D:\PycharmProjects\pythonProject1\venv\Scripts\python.exe D:/PycharmProjects/pythonProject1/leep.py
Enter year1600
Leap year
Process finished with exit code 0
year=int(input("Enter year")) if year%100==0: if year%400==0: print("Leap year") else: print("NOT a leap year") elif year%4==0: print("Leap year") else: print("NOT a leap year")
Output:-
D:\PycharmProjects\pythonProject1\venv\Scripts\python.exe D:/PycharmProjects/pythonProject1/leep.py
Enter year1600
Leap year
Process finished with exit code 0
0 Comments