😎Hey, thanks for watching! We’d love to know your thoughts/doubts here in the comments. 👉For professional self-paced certification courses (pre-recorded), visit: bit.ly/Pre-Recorded-Course 👉Don’t forget to SUBSCRIBE to our channel for more such videos & valuable content: bit.ly/KZbin-WsCubeTech
@vaibhavv47510 ай бұрын
More explanation is needed as to how the value continues to be printed......
@shaikhkashif99736 ай бұрын
Thanks
@durgaprasadbandari96825 күн бұрын
great explanation
@PythonProjectSolver7 ай бұрын
why 2 is consider as a prime number? because when 2 going to second for loop it is range of (2,2) than it check 2%2 that is equal to 0 than that is not a prime number. the solution is : find_p = range(1, 101) for p in find_p: if p > 1: for x in range(2, int(p**0.5) + 1): if p % x == 0: break else: print(p)
@venkatagovindpiradi1397Ай бұрын
I'm also thinking the same😢
@sushantchougale68182 жыл бұрын
Thank you very much Madam 😊
@velocxty2477 Жыл бұрын
Great explanation ma’am!⚡️
@Picture_of_truth2 ай бұрын
start=int(input("enter starting no:")) end=int(input("enter ending no:")) num=0 for num in range(2,end): for i in range(2,num): if num%i==0: break; else: print(num)
@__ayu Жыл бұрын
THANK YOU...
@Abdul-tu6mq4 ай бұрын
Sprrrrrrrrr maam
@Neerajahir02.ahir.2 жыл бұрын
Nice
@agrimgupta08053 ай бұрын
we can make it more optimized?
@ArtiKumari-rb6lj10 ай бұрын
Ma'am prime number repeated in output.
@Harshdhillon9 ай бұрын
Don’t print them in for loop break out from it
@KritarthShuklaA8 ай бұрын
Apna indentation check kro
@user-uk8yd4xj4i5 ай бұрын
Same problem
@a.dashish28442 ай бұрын
Your second If and else statment must in the block first range function
@a.dashish28442 ай бұрын
x = int(input(" x: ")) y = int(input(" y: ")) for i in range(x, y+1): if i > 1: # Ensuring we only consider numbers greater than 1 for m in range(2, i): if i % m == 0: break else: print(i) # Only prints if no divisor was found
@dawood35782 ай бұрын
mam I have a question. If I try to print else: statement with a tab space, right under second if, it prints the prime number more times than one. But when I write it like you have, behind the if: statement, it prints correctly. Isn't it necessary to use else: directly under if: statement. Please let me know. Thanks!
@ROHITH_PRO_518 күн бұрын
Same doubt bro
@swastikpanda567020 күн бұрын
this is my code yet i am not getting the correct output: a=int(input("a: ")) # b=int(input("b: ")) # num=0 # for num in range (a,b+1): # if num>1: # for i in range(2,num): # if num%i==0: # break # else: # print(num)
@ammarahmad70362 жыл бұрын
It's true
@mohammadajharuddeen89332 жыл бұрын
Reach native ka full course upload kro please
@ashsaha575010 ай бұрын
Code is not working... Expexted indented block saying... irritating
@MuhammadAwais-yt6je2 жыл бұрын
Unreal engine 5 ka b cours layaa
@AmaanKhan-cb4rn11 ай бұрын
❤❤❤
@ZenBeats012 жыл бұрын
❤️❤️
@mekalachinnikrishna83729 ай бұрын
Mam we are using num here but we are not defined num then how your output will come
@user-ic3xc1hu3v9 ай бұрын
Cz num koi variable ni h jisme values store krvai ho , simply "i" ko replace Kia h "num" se ,which means items in that range of numbers
@ichchakushwaha3209 Жыл бұрын
hey i printed "num+1 " at the place of "num", and not getting the "2" in output as a prime number l=int(input("lower limit: ")) u=int(input("upperr limit: ")) for num in range(l,u+1): if num>1: for i in range(2,num+1): if num%i==0: break else: print(num) break this is my code
@GamingGalaxyFF11 ай бұрын
remove the last break command then it will work😊
@AryanHuria9 ай бұрын
Hey you are doing in second loop num+1 , then it's wrong suppose from the first loop you took 99 , and the second loop gets divided by 99 , if you will write num+1 , it will get divided by 99 too and therefore program won't return a single prime number.
@shashankpandey51876 ай бұрын
check indentation once(your else statement)
@thangutabbycat10 ай бұрын
i%j==0. Ie... 2%2==0.... thats right? Then how 2 printed in prime
@kishorem54618 ай бұрын
Same doubt
@zulfiquarshaikh34617 ай бұрын
@wscubetech pls explain if 2%2 ==0 , then how 2 is getting printed in output
@PythonProjectSolver7 ай бұрын
this is correct code : find_p = range(0, 100) for p in find_p: if p > 1: for x in range(2, int(p**0.5) + 1): if p % x == 0: break else: print(p)
@PythonProjectSolver7 ай бұрын
this is correct code : find_p = range(0, 100) for p in find_p: if p > 1: for x in range(2, int(p**0.5) + 1): if p % x == 0: break else: print(p)@@kishorem5461
@PythonProjectSolver7 ай бұрын
@@zulfiquarshaikh3461 this is correct code : find_p = range(0, 100) for p in find_p: if p > 1: for x in range(2, int(p**0.5) + 1): if p % x == 0: break else: print(p)
@muzamilrana88542 жыл бұрын
1st comment😍
@sakshikadu772210 ай бұрын
i kya h
@user-ic3xc1hu3v9 ай бұрын
Items in range(0, upto to given num)
@skcreates3432 жыл бұрын
Mai es video par pahli baar aaya hu or Python learn karna chahta hu. Kya hum Python me koi app devlop kar sakte hai ? Kya hum Python se online tool bana sakte hai ? Can you guide me god bless you 🙏🙏🙏🌸🌸
@TilakRaj-qo6ic Жыл бұрын
Python is becoming a general purpose language slowly so you can do anything you want