No video

Python script to check leap year | हिंदी में

  Рет қаралды 138,199

MySirG.com

MySirG.com

Күн бұрын

Hello Friends, watch python script to check whether a given year is a leap year or not. Code uses single line if else. Explained in hindi
Like, Comments, Share and SUBSCRIBE
visit www.mysirg.com for all FREE videos

Пікірлер: 162
@aasthavidushi132
@aasthavidushi132 6 жыл бұрын
Although I haven't subscribed to your premium, still I would like to request you to come with some interesting stuffs a part from these common programming questions. We can do many interesting stuffs in Python with just 7-10 lines of code like opening browsers with pre set websites and many more like that. These kinds of practices helps way more than those typical common questions. I hope you consider my point. Thanks.
@somnaths.r4775
@somnaths.r4775 4 жыл бұрын
Mm
@sajangrover8663
@sajangrover8663 6 жыл бұрын
x = int(input("enter an year : ")) print("Leap Year") if x%400==0 or ( x%4==0 and x%100!=0 ) else print("Non Leap Year")
@harshpatel4384
@harshpatel4384 5 жыл бұрын
Yes you are right
@alokmishra-ug1om
@alokmishra-ug1om 4 жыл бұрын
@@harshpatel4384 bro if 100 is year then what isanswer
@ans7452
@ans7452 4 жыл бұрын
@@alokmishra-ug1om no leap year
@suvamsekhardash4838
@suvamsekhardash4838 3 жыл бұрын
bro why we cant use if x%4==0 directly to check whether it is a leap year or non leap year
@sajangrover8663
@sajangrover8663 3 жыл бұрын
@@suvamsekhardash4838 let's take an example 1900. now according to (x%4==0) condition it is a leap year. But actually it is not a leap year that's why we use (x%4==0 and x%100 !=0). Now lets take another example 2000. now according to '(x%4==0 and x%100 !=) this condition it is not a leap year. But actually it is a leap year, that's why we use (x%400==0). so now whole condition become (x%400==0) or (x%4==0 and x%100 !=0).
@vikramkumar-my5ow
@vikramkumar-my5ow 5 жыл бұрын
sir i searched alot this topic on youtube and google but u did ur best explanation.thank u so much sir!!!!!!!!!!
@balajiijjapwar1872
@balajiijjapwar1872 6 жыл бұрын
I always watch ur videos even if the problem looks easy, because every time I learn something new.As in here,I have learnt a new way to use if statement
@ROHITKUMAR-zz4gi
@ROHITKUMAR-zz4gi 10 ай бұрын
Sir bhut good padhate hi
@virajsharma8978
@virajsharma8978 3 жыл бұрын
Thanks a lot sir
@shailysaraswat4004
@shailysaraswat4004 2 жыл бұрын
Thank you so much
@owaiswaqar1624
@owaiswaqar1624 2 жыл бұрын
Best ever tutorial sir thanks alot
@saddamahmad2310
@saddamahmad2310 6 жыл бұрын
Thank You very much sir for this video
@yogendratripathi7753
@yogendratripathi7753 Жыл бұрын
Great
@abhishekjaiswal6489
@abhishekjaiswal6489 4 жыл бұрын
so many thanks to you sir
@shami3966
@shami3966 5 жыл бұрын
thankyou very much your vedios are easy and helpful...kindly keep it up.
@gagansehra5344
@gagansehra5344 6 жыл бұрын
sir please continue posting campus preparation videos.
@vijaysahal4556
@vijaysahal4556 4 жыл бұрын
wow sir 👍👍👍👍👍👍
@AsifAli-xk5wx
@AsifAli-xk5wx 6 жыл бұрын
You are the best.... Itni mhnat krke video bnate ho or Dekho ab 11:30 pm ho chuke hai mtlb aap hmesha students ki help krne ke liye tayyar rhte ho... Salute sir ji
@ramchoudhary4862
@ramchoudhary4862 6 жыл бұрын
Nice keep it up
@rajesh6571
@rajesh6571 5 жыл бұрын
Great sir 💙
@nishathaider6345
@nishathaider6345 4 жыл бұрын
Wesy... sir is logic se b kam chal sakta tha, aik condition hai just. if(x%4==0){ Cout
@jitendrasinghchouhan5088
@jitendrasinghchouhan5088 5 жыл бұрын
perfect video
@khanempire2161
@khanempire2161 2 жыл бұрын
1900 is a leap year. Harr 4 saal m ek baar leap year hota hai toh bas agar 4 se divide hua mtlb leap nhi toh non leap
@tanmoydebnath4108
@tanmoydebnath4108 4 жыл бұрын
From where you found the logic to divide it by 400?
@MrTruth-jh2zs
@MrTruth-jh2zs Жыл бұрын
But sir If user enter 4 or who numbers divisible by 4 answer will be leap year. 4 is not a year but according to your logic it's print leap year
@thetrueindian983
@thetrueindian983 4 жыл бұрын
thanks sir
@snehajitchandra2976
@snehajitchandra2976 6 жыл бұрын
Awesome!!!!
@maheshkandgule4266
@maheshkandgule4266 6 жыл бұрын
Then the years which are not multiple of 100 are not needed to be leap year .
@veeravsv
@veeravsv 6 жыл бұрын
Hi Sir Below i had made against assignment 2 please check is it wright or not print(" Please Enter A Year to Find Leap Year Or not") y = int(input("Pleas Enter a Year ")) if y%4==0 or y%400==00: print("%d is a leap year" %y) else: print("%d is not a leap year" %y)
@MrTruth-jh2zs
@MrTruth-jh2zs Жыл бұрын
Kindly suggest how to avoid this type of error. I hope sir you can reply
@SANYOG41
@SANYOG41 5 жыл бұрын
Hello sir, Please use jupyter console for python programme. 😀
@GaurAnilEducation
@GaurAnilEducation 6 жыл бұрын
Thanx sir for this please provide java language program
@ShoaibKhan-bn3cy
@ShoaibKhan-bn3cy 3 жыл бұрын
Sir kya python ko code block me programming kar sakte hai ya iske liye koi alag sa app download karna hoga
@prajapatisonu647
@prajapatisonu647 2 жыл бұрын
this code is not working in pycharm... what can i do sir .... can i use elif statmenr...?
@anmolsingh4969
@anmolsingh4969 6 жыл бұрын
nice sir jiiii
@sagarmeena0210
@sagarmeena0210 5 жыл бұрын
nice
@sapaleesingh5740
@sapaleesingh5740 6 жыл бұрын
1*2*3 7*8*9 10*11*12 4*5*6 Pattern printing ke logic plz sir
@pushpajitbiswas3752
@pushpajitbiswas3752 6 жыл бұрын
void main() { char s[50]; scanf("%[^ ]%*c",s); printf(s); } Sir, scanf walla line ko thora explain karke uske upar koi video bana sakte hai... Samajme nehi aa raha hai oh line ka matlab. Plzz sir help me!!
@MRAgundli
@MRAgundli Жыл бұрын
done
@wordslove7160
@wordslove7160 Жыл бұрын
why dont we divide the number by only 4. since it will also give whether its leap year or not
@talibarab7024
@talibarab7024 6 жыл бұрын
Plz complete this course early
@karansoni5630
@karansoni5630 6 жыл бұрын
Thnk u sir..
@AbhishekSharma-uf2ti
@AbhishekSharma-uf2ti 6 жыл бұрын
sir plz upload all course vedios related to python
@Mr.Umesh.21
@Mr.Umesh.21 4 жыл бұрын
Hello Sir, I'm Umesh.I started learning Python by your video. But in this video your written programme is not properly work. I wrote this programme same to same then I check lots of example and then I got a wrong answer. And then I started thinking about it then I got to know-Due to your one thinking mistake I got the wrong answer. I think so- if x%4==0 and x%100!=0 then how can it check the year like 3000. Because according to this programme 3000 is not divisible by 400. And it is divisible by 4. but it also divisible by 100. Then It means this programme is not correct to get the correct answer.
@abhisheknayak9498
@abhisheknayak9498 4 жыл бұрын
waah bhai
@istyakahamad
@istyakahamad 5 жыл бұрын
Sir kya hum sirf ek bar condition ko check nahi kar sakte year ko 4 se divide kar k ....
@shivamsinha6838
@shivamsinha6838 2 жыл бұрын
But there is a problem sir if we enter only 20 or 16 then it shows leap year. I don't understand. And the rest thing is ok
@tusharnigam2112
@tusharnigam2112 6 жыл бұрын
MySirG you are great..
@GamingWorldSuryansh
@GamingWorldSuryansh 6 жыл бұрын
1st
@jaydeepdey4654
@jaydeepdey4654 6 жыл бұрын
Sir ek web development ka v Premium course banayia...Please. Thank you
@deepakshah6227
@deepakshah6227 3 жыл бұрын
Sir python sikhane ke liye basic kya kya sikhana jaruri hai???🙏🙏🙏 reply me
@aaradhyapawar7108
@aaradhyapawar7108 4 жыл бұрын
Sir G please python ka pura course upload kar dijiye 🤞🏻🤞🏻🤞🏻
@programmingwallah2905
@programmingwallah2905 Жыл бұрын
2:41
@harshdeepsingh8211
@harshdeepsingh8211 6 жыл бұрын
Sir make a video on icpc competition
@musicvideomasaala2271
@musicvideomasaala2271 5 жыл бұрын
if x%400==0 condition false,then the control should go to else part and print leap year right. Why it is not happening here.
@yashmishra3674
@yashmishra3674 6 жыл бұрын
#first view
@aidenJ433
@aidenJ433 6 жыл бұрын
Sir...pls reply..pls ...i am in 2nd year bsc in computer science..but idont have maths as a subject...bt i want to appear for nimcet....will it be problem...
@ashishmishra7829
@ashishmishra7829 6 жыл бұрын
sir, please upload video on star pattern in python3. thank you!!!!!!!!!
@sanjaySharma-pe1vi
@sanjaySharma-pe1vi 3 жыл бұрын
Sir is it possible we do this question same as first one(check odd and even) As simple x%4==0
@user-rx5kq6oo9y
@user-rx5kq6oo9y 2 жыл бұрын
But it will give wronga nswer when it is 2100 or 2200 or 2300
@riturajkumar234
@riturajkumar234 Жыл бұрын
@@user-rx5kq6oo9y as 2100, 2200, 2300 is not a leap year.
@manojbaba9388
@manojbaba9388 4 жыл бұрын
premium version and free version same hai yaa alga alag aaj ki date pe
@RadheyShyam-sd8xw
@RadheyShyam-sd8xw 4 жыл бұрын
user_input = input("Enter a year: ") if user_input.isnumeric() and len(user_input) >= 3: # you increase by yourself or not if int(user_input[-1]) % 2 == 0: print(user_input, "is a leap year.") else: print(user_input, "is not a leap year.") else: print("opps wrong")
@taniyadas2800
@taniyadas2800 3 жыл бұрын
Hi sir but I m confuse in this sheet
@namastesneha
@namastesneha 5 жыл бұрын
sir , where are you coding ? notepad ??
@OwnGuru
@OwnGuru 5 жыл бұрын
No python cell
@spycrogaming5356
@spycrogaming5356 4 жыл бұрын
Yha pai 400 se divide krne ka matlab kya h jab leap year check kdna h to hm 4 se direct v to divide kd skte h??? Yha two case bnane ka ky jarurat tha sir?? Please samjhiye
@Rishifu620
@Rishifu620 2 жыл бұрын
Else me concoction parta hai
@munnasarkar6262
@munnasarkar6262 4 жыл бұрын
sir ,my base machine is linux.Tell me how to run python script on linux machine
@ayeshajahangir4679
@ayeshajahangir4679 5 жыл бұрын
Please upload the python programming for factorial,fibonacci,and palindrome
@rkisdp
@rkisdp 5 жыл бұрын
its already uploaded on premium.mysirg.com per
@TechnicalClasses555Er.Santosh
@TechnicalClasses555Er.Santosh 3 жыл бұрын
Hi! sweet girl Can u call at this no 8896354502
@kaminiroy7902
@kaminiroy7902 6 жыл бұрын
Sir we can use to more than one main function in program and we can make a program without main function
@rkisdp
@rkisdp 5 жыл бұрын
yes, you can
@amangupta-fq9rs
@amangupta-fq9rs 4 жыл бұрын
def nu(num): if num%4==0: return("leap") return("not leap") n=int(input("enter year")) print(nu(n))
@vishalrai2859
@vishalrai2859 4 жыл бұрын
Century year me problem dega
@VishwasVlogsHere
@VishwasVlogsHere 4 жыл бұрын
@@vishalrai2859 nahi problem hoga yaar , maine try kiya hai . Sir , alag situation ke liye hume taiyaar kar rahe hai 🙂😉
@Symbol_of_Romance
@Symbol_of_Romance 6 жыл бұрын
mysql work bench pe video load plzzzzz
@manojks1807
@manojks1807 6 жыл бұрын
Year 1900 and 2100 are also leap years
@rkisdp
@rkisdp 5 жыл бұрын
no bro its not seriously
@Dk-pt2rq
@Dk-pt2rq 5 жыл бұрын
Is x%400==0 is necessary
@ankitmishra9108
@ankitmishra9108 6 жыл бұрын
Why a programm which is well running on turbo c++ is not running on codeblocks or visual studio c++? e.g: please download and check this file: files.fm/u/t58vjdw9 It gives no compile error in turbo while gives many compile error in codeblocks or Visual studio c++
@ayeshajahangir4679
@ayeshajahangir4679 5 жыл бұрын
Sir how to download python application to run the code .like your's
@rkisdp
@rkisdp 5 жыл бұрын
just google 'download python 3' its pyhon IDLE
@MANISHKUMAR-zl1rg
@MANISHKUMAR-zl1rg 5 жыл бұрын
Sir G apke python classes Ke vedio nhi Mil pa rahi.........lecture 4 python Ke baad
@mysirgdotcom
@mysirgdotcom 5 жыл бұрын
Visit premium.mysirg.com
@shivangigoyal1408
@shivangigoyal1408 5 жыл бұрын
Sir, If I write the logic as: if x%4==0: print("leap year") else: print("Non Leap year") The answer is correct. This logic is also working in century and no n century years. Is it correct or there is any problem with this logic?
@amitguria2845
@amitguria2845 5 жыл бұрын
incorrect
@rkisdp
@rkisdp 5 жыл бұрын
not correct as your program will give True in case of year 1800 which is not a leap year in your example lets take x=1800--- if 1800%4 == 0: print ('Leap year') else: print('Non Leap Year') output--- Leap year which is wrong, keep in mind 1800 is just one of tones of those which will give wrong output
@spycrogaming5356
@spycrogaming5356 4 жыл бұрын
@@rkisdp bro 1800 to leap year h na
@spycrogaming5356
@spycrogaming5356 4 жыл бұрын
@@rkisdp mera v same doubt h
@banarasi_andaz
@banarasi_andaz 4 жыл бұрын
Sir clrscr nhi hoga ??
@brijnandantrivedi7975
@brijnandantrivedi7975 4 жыл бұрын
Hello sir Good evening Sir mjhe complete python ke lecturer mil jaye Mj
@AyushGupta-kb9iv
@AyushGupta-kb9iv 5 жыл бұрын
Why we don't take modulo 4 directly to check leap year..... e.g.->2448%4==0 then it is a leap year.
@rkisdp
@rkisdp 5 жыл бұрын
not correct as your program will give True in case of year 1800 which is not a leap year in your example lets take x=1800--- if 1800%4 == 0: print ('Leap year') else: print('Non Leap Year') output--- Leap year which is wrong, keep in mind 1800 is just one of tones of those which will give wrong output
@simmimehra5296
@simmimehra5296 4 жыл бұрын
How to find odd day in year
@simranbole5918
@simranbole5918 4 жыл бұрын
Sir sequence se h kaise pta chlega bhut confusion horha h
@surbhisuman1111
@surbhisuman1111 4 жыл бұрын
Just one video for introduction but where is remaing video..plz tell me video 2
@mysirgdotcom
@mysirgdotcom 4 жыл бұрын
Https://premium.mysirg.com
@veeravsv
@veeravsv 6 жыл бұрын
In this video you had not put the colon against if and else please clarify ...
@rkisdp
@rkisdp 5 жыл бұрын
sir is using case of one line if, else case.....if you want to learn one liner if else google is ready all the time
@iksh.chauhan2946
@iksh.chauhan2946 4 жыл бұрын
Sir please send me the links of python syntax
@nidhiverma1798
@nidhiverma1798 6 жыл бұрын
Sir plz can u upload the program of printing next prime no.of a given no......or you can plz tell me the logic in comment...
@rkisdp
@rkisdp 5 жыл бұрын
kzbin.info/www/bejne/pKashGeir9eUiMU
@fatemachandoo5558
@fatemachandoo5558 5 жыл бұрын
This is how i did mine x=int(input("Enter year to check if leap year: ")) if x%400==0: print(x, "is a leap Year") elif x%4==0: print(x, "is a leap Year") else: print(x, "is not a leap Year")
@kushagra4269
@kushagra4269 Жыл бұрын
this is inccorect.. as it will count every century year as a leap year
@subhashkumarfzixlmkfaz2988
@subhashkumarfzixlmkfaz2988 5 жыл бұрын
Ge sir I am subhash kumar How to create online shops websites in python. Please sir give me suggestions.
@mysirgdotcom
@mysirgdotcom 5 жыл бұрын
Use django
@mysirgdotcom
@mysirgdotcom 5 жыл бұрын
Visit premium.mysirg.com
@abhinavchauhangujjar6456
@abhinavchauhangujjar6456 6 жыл бұрын
sir in c++, can i use constructor, destructor, virtual function etc to make something meaningful, we don't have programs to practice these concepts and they are going out of mind.
@kameshsharma28
@kameshsharma28 6 жыл бұрын
not in python.. brother
@abhinavchauhangujjar6456
@abhinavchauhangujjar6456 6 жыл бұрын
kamesh sharma, ye in c++, i should edit comment
@prashantsharma2291
@prashantsharma2291 6 жыл бұрын
to do practice visit hackerrank.com
@Daduaofficial
@Daduaofficial 3 жыл бұрын
F
@julianafitzwater2904
@julianafitzwater2904 6 жыл бұрын
5th
@virendrameena2150
@virendrameena2150 5 жыл бұрын
Aap acha padate ho par main bat last mein btate ho😒
@_Avinashkumar-rr7ng
@_Avinashkumar-rr7ng 6 жыл бұрын
Sir, mai bca kr rha hu or mujhe mca v krna h or mai aapse janna chahta hu ki lateral entry se mca kro ya 3 year ka mca kru
@Sunilkumar-oy6fd
@Sunilkumar-oy6fd 6 жыл бұрын
digital India express 3 year mca is better than any lateral entry
@rkisdp
@rkisdp 5 жыл бұрын
tere per depend karta hai bhai BCA mein acchi knowledge nahi collect kar paya tab hi 3 year MCA karna
@innovativelife5378
@innovativelife5378 6 жыл бұрын
Sir plz upload remaining course... Of python u have told it will complete till 29 june but much of the course is remaining
@kameshsharma28
@kameshsharma28 6 жыл бұрын
bro.. kitna course hua h abi video m cover and kitna nahi.. ???
@innovativelife5378
@innovativelife5378 6 жыл бұрын
kamesh sharma..... Sequnce start hua hai.... And basics khtm
@kameshsharma28
@kameshsharma28 6 жыл бұрын
+innovative life kitne din m course complete ho jyega.... yur idea?
@unknownbadshah1094
@unknownbadshah1094 6 жыл бұрын
x = int(input("Enter the year: ") if x%400==0: print("It's a Leap year!!") elif x%4==0 and x%100!=0: print("It's a Leap year!!") else: print("It's not a Leap year :( ") why this program giving error of in valid syntax??? please help i'm begginer
@ARSIL_AFRIDI
@ARSIL_AFRIDI 5 жыл бұрын
First line me error hai, *int(input("Enter year"))*
@ARSIL_AFRIDI
@ARSIL_AFRIDI 5 жыл бұрын
Apne close nahi kiya ek bracket
@harshlatagupta9064
@harshlatagupta9064 4 жыл бұрын
Mera to first line likhne ke baad enter karte he msg print kar that hai enter an year age ka code likh nhi pa rhi Mai koi btaye ye kese hatega
@nitishkumaryadav9175
@nitishkumaryadav9175 5 жыл бұрын
Sir it give incorrect output when I input 2100 .
@rkisdp
@rkisdp 5 жыл бұрын
hmm might be 2100 is really not a leap year
@VishwasVlogsHere
@VishwasVlogsHere 4 жыл бұрын
Coding Mein Mistake hui hogi bhai🙂
@deadlock_33
@deadlock_33 6 жыл бұрын
Kya is type(one line) ki coding c me bhi kiya ja sakta hai
@prashantsharma2291
@prashantsharma2291 6 жыл бұрын
yadi aaisa possible hota toh shyd python kabhi banti hi nahi.
@nishithakur424
@nishithakur424 6 жыл бұрын
haha
@ManjeetSingh-nk5ww
@ManjeetSingh-nk5ww 6 жыл бұрын
sir ye programe jo ap run kr rahe vo khn software m kr rhe ho
@rkisdp
@rkisdp 5 жыл бұрын
python 3 IDLE
@edhankhar3057
@edhankhar3057 6 жыл бұрын
sir if else if se hoga na..
@mysirgdotcom
@mysirgdotcom 6 жыл бұрын
else if is not there in python, instead you can use elif
@edhankhar3057
@edhankhar3057 6 жыл бұрын
MySirG.com okay sir
@ankitkumar-ef8ie
@ankitkumar-ef8ie 5 жыл бұрын
is x%100!=0 is necessary?
@rkisdp
@rkisdp 5 жыл бұрын
yes, it is
@rajeshsav2895
@rajeshsav2895 6 жыл бұрын
why year =3000 is not lepear ??
@rkisdp
@rkisdp 5 жыл бұрын
because its not a leap year
@mrs.jyotinarwal5011
@mrs.jyotinarwal5011 5 жыл бұрын
Sir premium m kyu dala h apne video
@rkisdp
@rkisdp 5 жыл бұрын
ye paapi pet ka sawal hai behna, sir majbur hai
@ronakrawal8325
@ronakrawal8325 6 жыл бұрын
Sir how to use python for ethical hacking
@rkisdp
@rkisdp 5 жыл бұрын
by learning it very deeply
@n_k_vpage5302
@n_k_vpage5302 4 жыл бұрын
Sir apna what's app no .dijiye
@sanatdhobi9390
@sanatdhobi9390 6 жыл бұрын
First view
Leap Year Program | Python Tutorials
12:12
Amulya's Academy
Рет қаралды 76 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 397 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 52 МЛН
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 9 МЛН
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 1,4 МЛН
拉了好大一坨#斗罗大陆#唐三小舞#小丑
00:11
超凡蜘蛛
Рет қаралды 5 МЛН
C Program to check leap year
13:14
MySirG.com
Рет қаралды 94 М.
11 Tips And Tricks To Write Better Python Code
11:00
Patrick Loeber
Рет қаралды 610 М.
What is the best way to install python
20:02
Chai aur Code
Рет қаралды 61 М.
The  Ultimate Python Programming Roadmap (Before you Start)🐍
11:39
CodeWithHarry
Рет қаралды 522 М.
Python Program #9 - Check Leap Year in Python
6:01
Programming For Beginners
Рет қаралды 6 М.
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 438 М.
What are decorators in python
39:21
Chai aur Code
Рет қаралды 20 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 52 МЛН