P_28 Coding Exercise for Beginners in Python | Exercise 8 | Python Tutorials for Beginners

preview_player
Показать описание
In this lecture we have written a program in python to check whether given year is Leap year or not using nested if else statements.

*********************************************

Connect & Contact Me:

*******************************************

More Playlists:

#coding #pythonforbeginners #python #jennyslectures #pythonprogramming
Рекомендации по теме
Комментарии
Автор

year = int(input("Enter a year: "))
if (year % 400 == 0) or (year % 4 == 0 and year % 100 != 0):
print(year, "is a leap year.")
else:
print(year, "is not a leap year.")


For indentation why i suffer 😃 i do like this😁

emtiazahmed
Автор

Thanks!

Clarity is part of your lectures that's why I'm waiting for the next lecture!!

manfredmasiko
Автор

The rules for determining if a year is a leap year are as follows: If a year is evenly divisible by 4, 100, and 400, then it is a leap year. If a year is divisible by 4 but not by 100 and not divisible by 400, then it is also a leap year. If a year is not divisible by 4, then it is not a leap year.

chamarthykoushik
Автор

Thanks a lots mam for fast uploading
Now I can practice regularly 🙂

mr_affan
Автор

year=int(input("Enter the year:"))
if year % 100 == 0:
if year % 400 == 0:
print("Entered year is leap year")
else:
print("Entered year is not a leap year")
else:
if year % 4 == 0:
print("Entered year is a leap year")
else:
print("Entered year is not a leap year")

NandiniBhati
Автор

year = int(input("Enter year to check: "))
if(year % 4 == 0):
if(year % 100 != 0):
print(f"{year} is a leap year")
elif(year % 100 == 0 and year % 400 == 0):
print(f"{year} is a leap year")
else:
print(f"{year} is not a leap year")
else:
print(f"{year} is not a leap year")

chinenyeumeaku
Автор

Mam aap bohot bohot acha padhati ho I can understand English but I see your video and I can understand love you bhen

vipultarar
Автор

You are best teacher. really Thanks!!!

temesgeneba
Автор

Ma'm today you are looking absolutely AWESOME 🌹🌹and that's why i watch full video with my 100% attentio😊😊😊😊😊🌹🌹🌹😊😊😊😊

HemantKumar-lxkl
Автор

currently on p_30 very eager to learn every day🥰🥰

kainzascovia
Автор

Thank you for uploading! I love your teaching style. Keep up the good work <3

alondrarivera
Автор

Year= int(input('enter the year:')
If year %4==0:
Print('leep year')
Else:
Print(' not leep year')

obujh_mon_
Автор

year=int(input("enter the year you want to check:"))
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")

alok_kr_verma
Автор

Not divisible by 100 means not a leap year. But in flow chart it's leap year .

ashwini
Автор

mam this series fully undeastandable for eveone please complete the series as early as possible

mattapallichandrashekar
Автор

we can do like this also
a=int(input())
if (a%4==0 and a%100!=0) or (a%400==0):
print("LEAP")
else:
print("COMMON")

BalasriRadha
Автор

thankyou mam for making these videos for better under standing this subject

mattapallichandrashekar
Автор

year=int(input('enter Year '))

if(year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
print("Leper")
else: print("Not a Leper")

De-CODE
Автор

year = int(input("Enter the year: "))

if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
print("Yes, it is a leap year")
else:
print("No, it is not a leap year")

deepanchakravarthi
Автор

Thank you mam for fast uploading videos…..❤

shahanafaslu