Python Tutorial - Prime Numbers | Printing Prime Numbers in Given Interval

  Рет қаралды 222,494

Amulya's Academy

Amulya's Academy

Күн бұрын

In this python programming video tutorial you will learn about the prime numbers in detail with different examples.
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. Here we will discuss about how to write python program to print prime numbers in specific interval.
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy

Пікірлер: 396
@keyboardxbeats3069
@keyboardxbeats3069 2 жыл бұрын
Thank you! This was probably my 10th video trying to figure this out , and i think i finally got it. You're very good at explaining.
@adeniranoluwaseun1229
@adeniranoluwaseun1229 2 жыл бұрын
Have been struggling with understanding this and suddenly stumbled on this. So explanatory. Thank you for your effort.
@aniketkolte8958
@aniketkolte8958 4 жыл бұрын
Amulya's Academy Has Its Own Style Of Teaching .One Of The Best Channels On KZbin 🙌🙌🙌💥🔥🤑👏👏Thanks Mam!!!!
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@kevinmungame1869
@kevinmungame1869 5 жыл бұрын
Amazing teacher, finally I understood all I needed so far...beginner. Thank you
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
My Pleasure :)
@rohiburrehman2865
@rohiburrehman2865 2 ай бұрын
I just want to say one thing. Watched 10 videos but none of them were this good. Thank you so much. Hitting like and subscribe. For beginners this video is must.
@abdullah-al-mamun4111
@abdullah-al-mamun4111 3 жыл бұрын
You explain a complex thing in a wonderful and extraordinary manner. Great!
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you! 😃
@nandhinis3300
@nandhinis3300 6 жыл бұрын
u r awsome sis if u were my python teacher i will topper in my class ❤❤☺☺☺
@thirumalareddy5143
@thirumalareddy5143 6 жыл бұрын
Yes , But I want modules, Unittest Threading, Logging, Paramiko, For these models videos
@greenff1742
@greenff1742 3 жыл бұрын
You are learning python for marks wow
@familyvibes9707
@familyvibes9707 2 жыл бұрын
Congratulations sis
@harshmaheshwari4112
@harshmaheshwari4112 Жыл бұрын
No
@ayyanarayyanar5753
@ayyanarayyanar5753 Жыл бұрын
Yes same feelings
@sushimeng
@sushimeng 4 жыл бұрын
Hi, I have a question about what if 2 in the range(2, num), the range will be (2,2) which has no number contained.
@harikrishnants8545
@harikrishnants8545 4 жыл бұрын
It will print nothing. In this case, if your "num" is two(2), it means you would have given your upper limit as two(2).In range, it will take only (n-1) values. So that would print nothing. As it would be like (2,1), I suppose.
@siewkingsam2534
@siewkingsam2534 2 жыл бұрын
@@harikrishnants8545 then how she get 2 in the second example
@zaidmekrani8983
@zaidmekrani8983 2 жыл бұрын
This is the best video i ever watched for python programming. This is really begginer friendly.
@advatprashr13
@advatprashr13 4 жыл бұрын
maam, i am not able to understand how 2 is getting printed if we use 2 as our lower limit. 2 will get divided by range(2,1) hence will break out from the loop and nothing should be printed. please reply
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
We took range form 2 to num. {for i in range(2,num)} when num is 2 range will become range(2,2) so it won't execute for loop body so it will execute else part and it will print 2 as prime number.
@Himhim455
@Himhim455 4 жыл бұрын
your voice makes it interesting , but your expalanation is magic
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@kusumsharma7293
@kusumsharma7293 Жыл бұрын
You are such a great teacher , thank for helping people , great jobs
@sfundoy5dube59
@sfundoy5dube59 3 жыл бұрын
My greatest tutor ,I appreciate your work you're doing for us
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊
@khushbumodh8655
@khushbumodh8655 6 жыл бұрын
subscribed!!! But 1 request is you have to upload daily basis video on python
@kangajankuganathan7457
@kangajankuganathan7457 5 жыл бұрын
you are my best teacher in the world. thank sister.
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
My Pleasure :)
@DeepakRaj-pv5eo
@DeepakRaj-pv5eo 4 жыл бұрын
Hey amulya I have watched a video for prime numbers... I cant remember but it was like for i in range(2,n//2+1): If n%i ==0: break else: print(n) Is it true
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Yes i think this will work :)
@nagapavanyarramsetti283
@nagapavanyarramsetti283 4 жыл бұрын
@@AmulsAcademy pls explain this
@NajCarnage
@NajCarnage 2 жыл бұрын
Thank you so much! You are great at explaining the logic behind the code for novices like me.
@Aulin001
@Aulin001 4 жыл бұрын
Hopefully one day you definitely taking gold play button for such amazing content you deserve more and more subscribers Thank you for providing such amazing content mam
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you so much 😀
@bhavana333
@bhavana333 4 жыл бұрын
It's awesome . The way you explained was too basic and it's really helped me to understand internal loop flow.
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Pleasure :)
@HarshitaChattopadhyay
@HarshitaChattopadhyay 5 жыл бұрын
*Amazing*... Thanks a lot for helping me mam 😃😁😀
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Pleasure :)
@HarshitaChattopadhyay
@HarshitaChattopadhyay 4 жыл бұрын
Amuls Academy mam can u make practice programs in dictionary also ...it's a quit important topic . They ask in exam
@subbusubramanyam3375
@subbusubramanyam3375 2 жыл бұрын
what is the execution if inner loop range is (2,2)
@unknown__..--
@unknown__..-- 2 жыл бұрын
Same doubt
@aachi3788
@aachi3788 4 жыл бұрын
2 cute voices in youtube.. 1,strell 2,your's Awesome class tnx mam
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@sarveshmankar7272
@sarveshmankar7272 4 жыл бұрын
@@AmulsAcademy a
@sabithrad8899
@sabithrad8899 3 жыл бұрын
Your way of teaching is very nice mam... Easily understood
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@k_abhishek2056
@k_abhishek2056 2 жыл бұрын
Thank you so much .now i m getting confident in coding because of ur video..love and respect🙏🙌❤
@prasanthkumar7599
@prasanthkumar7599 3 жыл бұрын
very very very thanks for this understand ................... no words are coming finally after 3 days of madness in loops got this amazing,exellent vedio...... wow
@shubhamjain154
@shubhamjain154 3 жыл бұрын
Would this code work or not if not then plzz tell me why no = int(input("enter the no")) count = 0 for j in range (1,no+1): for i in range(1,j+1): if j%i == 0: count+=1 if count == 2: print(i) else: pass
@ThisIs_Ankush
@ThisIs_Ankush 2 жыл бұрын
Wow what an explanation mam, today I saw your channel and this video first time ,now I have subscribed this channel bcoz my query has solved here only tysm mam please come up with such more videos🙏🙏
@jithendrareddytamma6565
@jithendrareddytamma6565 3 жыл бұрын
Mam what about 2. 2 is also prime number, but after if statement is true, break statment will execute and I think its a loop. Pls explain
@jithendrareddytamma6565
@jithendrareddytamma6565 3 жыл бұрын
I understood. This reply is for those who didn't understand for 2. If your Lower limit is 2. It's 2 > 1 but when 2 will go to the (2, num) loop. It will become (2,1) because num will be excluded. So it will directly go to the print(num) function.
@anunayshukla7195
@anunayshukla7195 2 жыл бұрын
will this program work if we take lower value as 2 ???
@AnishEmilGodsonR
@AnishEmilGodsonR 3 жыл бұрын
i want to know why you are printing else statement in the line of for loop rather than if statement ???
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
We can use else with loops also, and here we need else with while loop 😀
@dhritimanbharadwaj2741
@dhritimanbharadwaj2741 6 жыл бұрын
Why ELSE part is written below FOR, not below IF?
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
We can use else with loops, for and while loop. And here we can't use else part with if . If i use that i won't get proper output. for i in range(2,num): if (num % i) == 0: print(num,"is not a prime number") print(i,"times",num//i,"is",num) break else: print(num,"is a prime number") for example: take number 21 control goes to if condition and it will check, if 21%2==0 No so it come out of the if body and execute else part, that is it will print message 21 is prime number, but it is not. i need to check all divisors right. So we can't write like this. We are using for - else because it will check whole for loop body, it will divide the number with every other number starting from 2 and if that number is not divisible then we will print the message that is "not prime number". :)
@charvireddy6432
@charvireddy6432 4 жыл бұрын
@@AmulsAcademy Thank you so much. I have the same question. it really makes sense to me now.
@vedantx-b2986
@vedantx-b2986 3 жыл бұрын
@@AmulsAcademy I was having the same question thnx for answering , actually no one explains this for-else loop nor I find it on any website so it's a bit confusing
@ramyababu5139
@ramyababu5139 6 ай бұрын
This video was Very clear explanation compare to other videos.....Thank you so much mam......
@tgdesihiphopraps
@tgdesihiphopraps 4 жыл бұрын
Wow!! Nice explanation Finally i got the logic for prime number I appreciate ur work
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Glad to hear that :)
@tgdesihiphopraps
@tgdesihiphopraps 4 жыл бұрын
@@AmulsAcademy have u uploaded prime number using while loop because its way too confusing in while loop
@soulfulman4834
@soulfulman4834 4 жыл бұрын
In case if we have to check only one input number is prime or not then how can we do it??? Another one that we know that 1 is prime number but by using this code we can't get result as 1 is prime number as u mentioned number > 1. So how we check 1 is prime number or not???
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
To check entered number is prime or not: kzbin.info/www/bejne/oJacd5aunLF1nJY 1 is not a prime number. :)
@NBEESETTISRAVANI
@NBEESETTISRAVANI 3 жыл бұрын
Than you so much mam,ur explanation will be change us ,please come again with more video to improve us mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure 😊
@deepikachalla8163
@deepikachalla8163 5 жыл бұрын
I tried using without break statement in this code...I have given number as 9..output as showing as 9 is not a prime number and 9 is a prime number Num=int(input("enter a number:")) If num>1: For I in range(2,num): If num%i==0: Print num,"is not a prime number" Else: Print num,"is a prime number" Else: Print num,"is a prime" Pls explain
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
When i know there is a number which divides entered number then i know that number is not prime , so when for i in range(2,num): if num%i==0: This condition becomes true then i will print number is not prime and i don't want to execute anything else, so i used break statement there. for example if i take number as 16, first i will check whether 16 is divisible by 2 if yes then i won't check further , i know 16 is not prime so i will print that and stop execution. in your case you are not using break statement, so when i take number as 9, it will check 9%2==0 no so it will check 9%3==0 yes , so it will print 9 is not prime number, but again continue with the for loop, so it will check 9%4==0.... till i =8 ok. here if any other number divides 9 then again the massage "9 is not prime number" will be printed. After that control comes out of the loop , and it will execute else part because , The else block just after for/while is executed only when the loop is NOT terminated by a break statement. Ok so you will get 9 is prime number message also :)
@deepikachalla8163
@deepikachalla8163 5 жыл бұрын
@@AmulsAcademy thank you so much
@manikandand2541
@manikandand2541 4 жыл бұрын
hey 9 is not a prime number
@muhammedanask8556
@muhammedanask8556 3 жыл бұрын
Bro, what about num=2 and i=2 case So the loop will break, but 2 is prime Please explain
@rma1563
@rma1563 4 жыл бұрын
Your explanation is crystal clear! ❤
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@jayasankar2269
@jayasankar2269 3 жыл бұрын
will you plz explain once
@luisvaldez6295
@luisvaldez6295 5 жыл бұрын
Explain me please, why you added " +1" the beginning . For num in range (lower, upper +1) , I ran without "+1" and it worked.
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
In range function, end is exclusive. syntax of rang function is, range(start,end,step) if you want to print 1 to 10 numbers then you need to take range as, range(1,11) try this: for i in range(1,11): print(i) :)
@luisvaldez6295
@luisvaldez6295 5 жыл бұрын
Amuls Academy I understood. Thank you 🤗
@Sidramnathsing
@Sidramnathsing Жыл бұрын
I have done what you did but then many of the numbers ended up printing multiple times. Can someone help me with this?
@lekkalabhargav-di5fo
@lekkalabhargav-di5fo 11 ай бұрын
Break the statement after one loop
@ASHOKKUMAR-jm6yn
@ASHOKKUMAR-jm6yn 5 жыл бұрын
Tnq for clean n crisp explanation. Keep uploading.. Lots of love from Visakhapatnam
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you :)
@allenjr4978
@allenjr4978 3 жыл бұрын
@@AmulsAcademy what if the lower value starts from 2
@francismannion7075
@francismannion7075 5 жыл бұрын
Thank you Amul for a very well presented lesson. Thanks to you I now understand !
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
My Pleasure :)
@technicalguy5668
@technicalguy5668 6 жыл бұрын
i dont understand how 2 is printed when (2%2 == 0) if u take range from 2 to 15 instead of 5 ...how 2 is printed when its remainder is 0 when divided by 2...but your code is printing 2 how ?
@austinejose1516
@austinejose1516 6 жыл бұрын
yeah this is what my question also,,
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
for i in range(2,num): if (num % i) == 0: when num =2, for i in range(2,2) : so it won't execute for loop body, control goes to else part directly. so it won't execute if condition. If you have still confusion, execute this piece of code for i in range(2,2): print("h") else: print("a") in range() start and end value is same it won't execute the for loop. :)
@kangajankuganathan7457
@kangajankuganathan7457 5 жыл бұрын
@@AmulsAcademy thanks sister
@anilmacharla6939
@anilmacharla6939 3 жыл бұрын
is it correct? lower=int(input("enter the lower limit")) upper=int(input("enter the upper value:")) for num in range(lower,upper): if num>1: for i in range(2,num): if num%i==0: print(num,"not prime") break else: print(num,"prime")
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
In the for loop use range as lower to upper+1 😊
@sahanasjalageri1092
@sahanasjalageri1092 2 жыл бұрын
Mam only this method can use Or other methods r in there
@nandathota
@nandathota 5 жыл бұрын
I liked your voice and way of explanation very nice...really satisfied your channel name amuls..thanks soo much
@clashon4645
@clashon4645 2 жыл бұрын
Has to really appreciate how well u explain everything 🙏🏻❤️💯
@rahulprasadsingh2639
@rahulprasadsingh2639 5 жыл бұрын
lower=int(input('lower')) upper=int(input('upper')) for num in range (lower,upper+1): if num>1: for i in range (2,num): if num%i==0: break else: print(num)
@deepikachalla8163
@deepikachalla8163 5 жыл бұрын
Could you please upload the video for difference between functions,class,attributes,methods and explain it clearly with one example...how all works
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Ok i will try :)
@jitheshjackeyjo4998
@jitheshjackeyjo4998 5 жыл бұрын
Wow..!! Excellent explanation ma'am
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you :)
@nidhirajput810
@nidhirajput810 5 жыл бұрын
Amul good job...but I have a small doubt ..here u used else condition may I know it belongs to which if condition...
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
else is for, for loop :)
@roasted_boy6213
@roasted_boy6213 4 жыл бұрын
thanks mam u r really awesome i was not able to understand about num function in this code but u cleared my doubt thanks a lot again
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
You are welcome 😊
@CorporateLifeRock
@CorporateLifeRock Жыл бұрын
thank you very much mam! really your all lectures are very helpful for me.
@diogenes2784
@diogenes2784 4 жыл бұрын
how do you count the length of "num" i tried: n=999 for num in range(0,n+1): if num>1: for i in range(2,num): if(num%i)==0: break else: print(len(num)) could you help?
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
convert num to string and use len() :)
@diogenes2784
@diogenes2784 4 жыл бұрын
@@AmulsAcademy n=999 for num in range(0,n+1): if num>1: for i in range(2,num): if(num%i)==0: break else: print(num) sum(int(num)) I don't know how to get it to work?
@naveenadhikari5953
@naveenadhikari5953 6 жыл бұрын
can you plzz tell for which num you define for eg if you choose two limits 5 and 35 so for which FOR loop from 2,num is applicable
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
Sorry i am not getting your question can you please explain little more?
@121atifaslam
@121atifaslam 5 жыл бұрын
Hey, I need to print the prime numbers separated by commas, how can I do that?
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
lower = 900 upper = 1000 print("Prime numbers between",lower,"and",upper,"are:") for num in range(lower,upper + 1): if num > 1: for i in range(2,num): if (num % i) == 0: break else: print(num, end=",") print(end=".") In print() take end =coma :)
@meenaljain5654
@meenaljain5654 5 жыл бұрын
else: print(num,end=",")
@anajimenez5118
@anajimenez5118 4 жыл бұрын
@@AmulsAcademy i dont understand the in print() part, it gives me an error
@VaasuNga
@VaasuNga 5 жыл бұрын
Your tutorials are better than udemy.
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you:)
@aneeshmalapaka8363
@aneeshmalapaka8363 4 жыл бұрын
mam this is so simple but...once check this code i got form a website www.programiz.com/c-programming/examples/prime-number-intervals here i didnt get the second for loop, why did they divide by 2 at all..like what is the reason...
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
They took 2 loops but they used 1 while loop and 1 for loop :)
@sunilpatil31914
@sunilpatil31914 4 жыл бұрын
Your explanation is best
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thanks a lot 😊
@rudraavtar7754
@rudraavtar7754 3 жыл бұрын
Aapka n *python tutorials* summe m bra aacha lgta h
@sangbala9201
@sangbala9201 3 жыл бұрын
I want numbers in single line and I want comma in between numbers. What can I do
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
use end parameter . you can try end="," in print function
@sangbala9201
@sangbala9201 3 жыл бұрын
@@AmulsAcademy Thank you
@sangbala9201
@sangbala9201 3 жыл бұрын
@@AmulsAcademy I have another doubt. If I use print(i, end=",") as you said, I get comma at the end of the number. That is , my lower range is 1 and my upper range is 10. My prime numbers are2,3,5,7 . If I use end="," in print , i get my output as 2,3,5,7, . I get comma at the end of 7. How to avoid this.
@sachinshukla2227
@sachinshukla2227 3 жыл бұрын
I am learning ,keep it up please
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊
@afifamrullah9496
@afifamrullah9496 5 жыл бұрын
mam can you help me to make a list of prime numbers in loop with yes or no to continue? im stuck with int not callable
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Give me your program i will correct it. :)
@p.mousumipriyadarshini8677
@p.mousumipriyadarshini8677 3 жыл бұрын
you got a new subscriber!!😊😊👌😘👍👍
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Welcome!! :)
@Navin_edits44
@Navin_edits44 2 жыл бұрын
Mam can you u tell me ...how to print the negative prime numbers
@craftnclash1952
@craftnclash1952 4 жыл бұрын
its awesome tomorrow is my exam I hope I will do better tomorrow !😊😊
@andrinrafealla8763
@andrinrafealla8763 5 жыл бұрын
Mam, how did this logic work for when num is 2 Coz 2%2==0
@reetasharma7505
@reetasharma7505 5 жыл бұрын
Range from 2, num means num will not be included in the for loop
@andrinrafealla8763
@andrinrafealla8763 5 жыл бұрын
@@reetasharma7505 : I didn't get it... can you please elaborate
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
for i in range(2, num) when num=2 for i in range(2,2) here range is from 2 to 2, so it won't execute for body. :)
@kfbscit074aryansingh4
@kfbscit074aryansingh4 2 жыл бұрын
Very well explained !!! Keep it up
@mamatharani-xd6zp
@mamatharani-xd6zp Жыл бұрын
I love your teaching
@saikrishna.arumalla3355
@saikrishna.arumalla3355 3 жыл бұрын
your explanation is super.is this any possible to decrease the length of the programe ?
@lohithv5060
@lohithv5060 4 жыл бұрын
Mam excellent teaching 😊😊😊
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thanks a lot :)
@lohithv5060
@lohithv5060 4 жыл бұрын
Mam is there machine learning and artificial intelligence in your academy
@lohithv5060
@lohithv5060 4 жыл бұрын
If it is there, please send me the link .If it is not there please make a tutorial on it🙏🙏🙏🙏
@sundaribalatripula4460
@sundaribalatripula4460 4 жыл бұрын
Thank you so much mam ur videos are Very helpful... please keep going
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@Rithanya117
@Rithanya117 4 жыл бұрын
Hi here how 2 is executed if I put 2 as upper limit
@zaedgtr6910
@zaedgtr6910 Жыл бұрын
Excellent explanation
@ekeshtayal8178
@ekeshtayal8178 6 жыл бұрын
awesome video Sister,your videos helps me lot......................
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
Thank you:)
@rohanmalandkar8566
@rohanmalandkar8566 4 жыл бұрын
For which 'if loop' that 'else loop' is applied??
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
else part is used with for loop here :)
@rohanmalandkar8566
@rohanmalandkar8566 4 жыл бұрын
@@AmulsAcademy ok thanks got it
@girijaaakula5322
@girijaaakula5322 6 ай бұрын
Thank you so much mam.. 👍🙏
@johnstabbyman5704
@johnstabbyman5704 5 жыл бұрын
Do you have a video showing how to write a function that returns a list of the prime factors of a given number n? If not I would greatly appreciate seeing such an explanation. Thank you
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you for the suggestion. I will do that video soon :)
@johnstabbyman5704
@johnstabbyman5704 5 жыл бұрын
Amuls Academy thanks! I will keep a look out at your channel
@yaswanthreddy3839
@yaswanthreddy3839 4 жыл бұрын
Great teaching ma'am
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thanks a lot :)
@amritkaur5081
@amritkaur5081 4 жыл бұрын
Mam i dont get the indentation of else condition.
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
else is part for for loop, like if else we can use else with loops also. :)
@prathameshpawar8793
@prathameshpawar8793 3 жыл бұрын
Nice explanation.
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@anniedhawan7945
@anniedhawan7945 4 жыл бұрын
superb 👌 could understand very easily. Thankyou ☺️
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Most welcome 😊
@TusharsMedlife
@TusharsMedlife 4 жыл бұрын
Best explaination
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@hhemanthkumar8599
@hhemanthkumar8599 3 жыл бұрын
Ⓛⓞⓞⓢⓤ
@sipahisnm
@sipahisnm 3 жыл бұрын
best teacher ...
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@shruteekhot1483
@shruteekhot1483 4 жыл бұрын
This is so nicely explained.Thank you!
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Glad it was helpful! :)
@ayoubbelouadah7195
@ayoubbelouadah7195 6 жыл бұрын
I've tried it on pascal and instead of printing each prime number one time it printed 3 one time , 5 three times , 7 five times (intevalle is 2 to 10) any explanation ?
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
may be the misplacement of print() is the reason:) I don't know pascal language actually;)
@joebrice8567
@joebrice8567 5 жыл бұрын
late reply but you need to add break to the else statement aswell
@wasimferoz6378
@wasimferoz6378 2 жыл бұрын
Very lucid explanation ma'am Thank you
@LPTV84
@LPTV84 4 жыл бұрын
Could someone please explain why the else statement is now a for-else statement? I never heard of that before.
@komaljaswani7497
@komaljaswani7497 4 жыл бұрын
Hi! Can you please make a video on the question: If a list in python has mix of strings & numbers, how will you make separate lists of strings & numbers? I saw ord() for getting ASCII code in python & chr() for converting ASCII codes to characters somewhere & tried to use them to get answer of this question but it did not work!! :(
@sufiyanmogal1527
@sufiyanmogal1527 2 жыл бұрын
Nice Explanation Mam 👏
@saleem7266
@saleem7266 5 жыл бұрын
thank you madam u are really teaching well
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Pleasure :)
@prudhvi9440
@prudhvi9440 5 жыл бұрын
will ELSE work with FOR loop if it is C language
@pravalmarya1892
@pravalmarya1892 2 жыл бұрын
Thankyou for the incredible explanation.....
@shashankgowda8063
@shashankgowda8063 3 жыл бұрын
i was looking for a set of programming examples to practice...its great that i found your playlist!...solving the problems with proper explanation, tq
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Glad it was helpful! :)
@gujjugaming3177
@gujjugaming3177 3 жыл бұрын
Nice mam this was useful in my study📚✏
@sapnasaini6371
@sapnasaini6371 3 жыл бұрын
Thanks for ur help..... But the spellings of *remainder* are not *reminder*
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Haha.. i know 😊
@sueseonsangnim5134
@sueseonsangnim5134 3 жыл бұрын
Hi. thank you for this video. but, here, i got some coding to print prime number using the while loop. But, i dont really understand the code.(line 6-13). Can you please explain to me? thank you in advance. Really appreciate your help. print("THIS WILL PRINT PRIME NUMBER.") n=int(input("INPUT NUMBER: ")) p=i=2 while p
@sanc7897
@sanc7897 Жыл бұрын
Hats off ❤🎉
@oluwadareisrael6696
@oluwadareisrael6696 5 жыл бұрын
I had thought writing a program to calculate prime number was just a fantasy, until i stumble at your tutorial. very comprehensive! Could you give out your email so i can share with you some of the problems in python i do encounter, perhaps you can help me.
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you :) It's better you ask your queries here :) mail: AmulsAcademy@gmail.com
@varshapn813
@varshapn813 4 жыл бұрын
Is it possible to use the condition if (num%i)!=0:
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 403 М.
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,9 МЛН
Solve any Star Pattern program in Python
18:44
Simply Coding
Рет қаралды 960 М.
Think Fast, Talk Smart: Communication Techniques
58:20
Stanford Graduate School of Business
Рет қаралды 40 МЛН
Python Tutorial - Fibonacci Series
13:49
Amulya's Academy
Рет қаралды 186 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,2 МЛН
Python - Print All Prime Numbers In Any Interval
6:00
Wrt Tech
Рет қаралды 45 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 308 М.
Python Programs - Factorial Program Using Recursion
18:08
Amulya's Academy
Рет қаралды 74 М.
Python Pattern Program - Printing Stars in Heart Shape
14:30
Amulya's Academy
Рет қаралды 592 М.
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН