No video

Python Tutorial - Prime Numbers | Program To Check Entered Number is Prime or Not

  Рет қаралды 174,076

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 how to write python program to check whether the entered number is prime or not.
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy

Пікірлер: 242
@manishbaburaisingh1985
@manishbaburaisingh1985 6 жыл бұрын
Simple and good .need more videos on the programs which are general in interviews
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
Sure:) Thank you:)
@priyankavaidya110
@priyankavaidya110 3 жыл бұрын
Thank you so much for explaining with example. I was confused with for loop. Now ,it is completely clear to me ....how it works.
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Glad it was helpful! :)
@nehajoshi4978
@nehajoshi4978 4 жыл бұрын
after watching so mny videos i understood from yours ty:-):-)
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Glad to hear that :)
@Engineer9060
@Engineer9060 2 жыл бұрын
how you understood tell me also its totally wrong code ,it is for even no. when you will do it for 21 it will show prime but 21 is not prime....
@abhishekpani6735
@abhishekpani6735 3 жыл бұрын
Thanku so much .. it really helped me...❤️
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Glad to hear that :)
@shruthisagar7677
@shruthisagar7677 6 жыл бұрын
Hi . Very well explained . Easy to understand and solve it Thank You
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
Welcome:)
@omkar1592
@omkar1592 3 жыл бұрын
your voice and explanation both are amazing
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊
@darthsidious1137
@darthsidious1137 4 жыл бұрын
Wish I would of found this video a couple hours ago. Had to settle with the brute force method for my assignment.
@galadimatimothy802
@galadimatimothy802 5 жыл бұрын
Well done.. Perfectly explained
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you :)
@Pikachu-dw3qk
@Pikachu-dw3qk 3 жыл бұрын
mam please say how this technique applies if we give input number 2 ??? for other numbers i understood this code perfectly except number 2 case please reply mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
When input is 2, for loop body will not execute and else part will execute :) In for loop start is 2 and end is 2 so it won’t execute loop body :) And because for loop is not terminated by break statement , else par will execute :)
@Pikachu-dw3qk
@Pikachu-dw3qk 3 жыл бұрын
@@AmulsAcademy ok mam i got it thanks for the reply
@hmx21
@hmx21 3 жыл бұрын
You don't need to check all the way till num, running the loop till num//2 would get you the same result.
@DrRCB
@DrRCB 2 жыл бұрын
yes. However there is still a shorter range than n/2.
@okechukwuerinne2039
@okechukwuerinne2039 2 жыл бұрын
I tried this and got a wrong output. I got "4 is a prime number." Perhaps I messed up the program somewhere.
@lolbaba7403
@lolbaba7403 2 жыл бұрын
@@okechukwuerinne2039 number=2 divisor=2 if number ==divisor or number==1: print("prime number") else: if number%divisor==0: print("Not prine") else: print("Prime") This is code for short range. But when it comes to find prime number in some range then this code is wrong.
@shayaanrk
@shayaanrk Жыл бұрын
@@okechukwuerinne2039 for such basic exceptions, you should have already added another if statement. if num%2==0 then print False
@trundlingwithjoy2237
@trundlingwithjoy2237 3 жыл бұрын
thank you for this keep up the good work
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊❤️
@rajangymtech.7073
@rajangymtech.7073 2 жыл бұрын
Your teching ideas mind blowing
@amansharma-it4df
@amansharma-it4df Жыл бұрын
Very good video you solve me very very big problem thank you very much again
@listentosilently
@listentosilently 3 жыл бұрын
Video is good #TECH_INTERVIEW_PREPRATION
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you 😊
@listentosilently
@listentosilently 3 жыл бұрын
🙏🙏🙏
@radiagulzan
@radiagulzan 5 жыл бұрын
Thank you so much! But, what do we do with the input 2 in the end?
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
2 is a prime number :)
@darshanchaudhari9836
@darshanchaudhari9836 2 жыл бұрын
Bro same doubt , did you get the answer
@okechukwuerinne2039
@okechukwuerinne2039 2 жыл бұрын
Thank you so much for this; it was a life saver.
@obulasettyganesh8920
@obulasettyganesh8920 2 жыл бұрын
🤣🤣🤣🤣
@jnageswararao8574
@jnageswararao8574 2 жыл бұрын
U voice is good....
@dudeinspace1491
@dudeinspace1491 2 жыл бұрын
Ur voice keeps entertaining..!
@gandrakavya8201
@gandrakavya8201 2 жыл бұрын
thank you mam!!!....ur vedios make me to solve programs on my own :)
@daniellejdevlin8882
@daniellejdevlin8882 3 жыл бұрын
Can you explain why number=2 shows up as prime in the code when 2÷2=0? I know 2 is prime
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Check for loop range 😊
@unclerojelio6320
@unclerojelio6320 4 жыл бұрын
There is not need to check the for divisors greater than sqrt(num). You can increase the efficiency of this program quite a bit by changing the for loop to: for i in range(2, sqrt(num))
@tuomasbazzan1523
@tuomasbazzan1523 3 жыл бұрын
Thank you
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure :)
@ganpatinatrajan5890
@ganpatinatrajan5890 Жыл бұрын
Excellent Explanations...👍👍👍
@lilyfullery4779
@lilyfullery4779 Ай бұрын
Too good ❤
@possiblesupport1029
@possiblesupport1029 2 жыл бұрын
Super explaination on the whole youtube
@vidithnarayana2346
@vidithnarayana2346 4 жыл бұрын
I like your explanation 👌👌 TQ so much
@deepikamathur9466
@deepikamathur9466 3 жыл бұрын
Nice mam..
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@shivabagareddy9195
@shivabagareddy9195 3 жыл бұрын
Good explanation with impressive voice..... Want to listen more of your voice:)
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@SanOp-zx1pc
@SanOp-zx1pc 9 ай бұрын
this code is wrong input numbers like 27,321,etc... which are not divisible by 2 but are not prime numbers.... still the programme gives the numbers to be prime correct programme code num=int(input('Enter a positive number :')) if num > 1: # Iterate from 2 to n / 2 for i in range(2, int(num/2)+1): # If num is divisible by any number between # 2 and n / 2, it is not prime if (num % i) == 0: print(num, "is not a prime number") break else: print(num, "is a prime number") elif num==0: print(num,'is neither prime nor composite.....') else: print(num, "is not a prime number")
@SanOp-zx1pc
@SanOp-zx1pc 7 ай бұрын
@@A4KSHAT Bro is 27 a prime number??? ofcourse not , so how it is showing that it is a prime number
@A4KSHAT
@A4KSHAT 7 ай бұрын
@@SanOp-zx1pc i am sorry it is show it is not a prime number
@dharmikmistry8781
@dharmikmistry8781 4 жыл бұрын
It's very good 👏👏👍
@Sandeep-sh7uc
@Sandeep-sh7uc 2 ай бұрын
You wrote print(num,"is not a prime number" ) in FOR loop why it is not printing for num number of times
@ahinav.s1925
@ahinav.s1925 2 жыл бұрын
Thanks
@aniketpatil1737
@aniketpatil1737 2 жыл бұрын
I am watching this masterpiece in Dec 2021
@itzscytesalpha2963
@itzscytesalpha2963 3 жыл бұрын
Nice vid
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :)
@Raja-tt4ll
@Raja-tt4ll 4 жыл бұрын
Great explanation thanks
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@gayathrishanmuganathan4205
@gayathrishanmuganathan4205 4 жыл бұрын
you explained it very Well
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@Engineer9060
@Engineer9060 2 жыл бұрын
no she explained wrong go for 21,9
@gayathridevip4632
@gayathridevip4632 3 жыл бұрын
Sisy.. plz put videos for sum of next 2 consecutive numbers
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Will try 😊
@tanweerkarzai7355
@tanweerkarzai7355 2 жыл бұрын
withought using breal ,how to solve it
@ameyashetty1441
@ameyashetty1441 3 жыл бұрын
hey 2 is a prime no but 2%2==0 then how does this work
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Please check for loop range, starting value and end value is same that is 2, so it won’t execute loop body 😊
@nandithaarunshetty1473
@nandithaarunshetty1473 Жыл бұрын
@@AmulsAcademy no it's not same it becomes(2,1) right as end value is excluded
@swathinagarajan4804
@swathinagarajan4804 3 жыл бұрын
Tq mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure 😊
@nishasrinivasan4621
@nishasrinivasan4621 4 жыл бұрын
Thank you so much for this
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
My Pleasure :)
@bakrymohamed8711
@bakrymohamed8711 3 жыл бұрын
my teacher I think we don't need the break statement so that after the if condition becomes false the for else will work
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
The else block just after for/while is executed only when the loop is NOT terminated by a break statement. So you need to break statement here. Note: remove break and try to execute the program.
@bakrymohamed8711
@bakrymohamed8711 3 жыл бұрын
@@AmulsAcademy right
@vishaljat4398
@vishaljat4398 2 жыл бұрын
Thank you❤
@nareshchoudhary4799
@nareshchoudhary4799 Жыл бұрын
How to save it with which name
@dharshinimagesh9591
@dharshinimagesh9591 5 жыл бұрын
hi mam, pl write this example with while loop . i hav tried many times but always stuck wit where to give the increment "i=i+1" operator .
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
num = int(input(":")) if num > 1: i = 2 while i < num: if (num % i) == 0: print(num,"is not a prime number") break i =i+1 else: print(num,"is a prime number") else: print(num,"is not a prime number") :)
@dharshinimagesh9591
@dharshinimagesh9591 5 жыл бұрын
@@AmulsAcademy thank u very much . can u pl tel me wats wrong in this code n if possible could u correct it ?
@dharshinimagesh9591
@dharshinimagesh9591 5 жыл бұрын
lower=int(input("lower no ")) upper=int(input("upper no ")) i = 2 for num in range (upper,lower+1): while i < num: if (num % i) == 0: print(num,"is not a prime number") break i =i+1 else: print(num,"is a prime number") i want to print prime no's in the intervals like this, without two for loops ..
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
lower=int(input("lower no ")) upper=int(input("upper no ")) for num in range (lower,upper+1): i=2 while i < num: if (num % i) == 0: #print(num) print(num,"is not a prime number") break i =i+1 else: print(num,"is a prime number") Try this :)
@dharshinimagesh9591
@dharshinimagesh9591 5 жыл бұрын
​@@AmulsAcademy thank u very much mam . I've identified my mistake 🙏 u dont believe me , i have been fighting with this prime no's prg for past TEN days and I've found ur videos accidentally and i havnt expected this much response from u . u r really a respectful and a responsible teacher .🙏
@TJ-wo1xt
@TJ-wo1xt 2 жыл бұрын
nice one.
@shivprakashyadav3814
@shivprakashyadav3814 3 жыл бұрын
why else is used for for loop not for if
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
We can use else case with loops :)
@totansarker5460
@totansarker5460 4 жыл бұрын
wow.. thank you very much.
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
You are most welcome :)
@varshacm1444
@varshacm1444 4 жыл бұрын
Mam why else is straight under for loop it should be under if know mam plse do reply mam
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
We can use else case with loops also. Here we want else part with for loop. The else block just after for/while is executed only when the loop is NOT terminated by a break statement.
@bhavithasulax.
@bhavithasulax. 2 жыл бұрын
Mam how can we print those prime numbers
@trundlingwithjoy2237
@trundlingwithjoy2237 3 жыл бұрын
maam but if we put 9 it is showing that it is a prime number but as we know that it is not a prime number.....maam how to solve this problem?/
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Give me the program 😊
@mika4444
@mika4444 3 жыл бұрын
how to check the number is a prime number in a range entered by the user????
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Give me an example :)
@mika4444
@mika4444 3 жыл бұрын
@@AmulsAcademy for example...user enters the starting range and ending range...from that range we have to find which numbers are prime numbers.
@ashishsinha5015
@ashishsinha5015 4 жыл бұрын
mam why you have used else with for loop but not with if
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
else case can be used with loops also :) here we need else part with for loop :)
@Balustatus
@Balustatus Жыл бұрын
tq
@pravaalc8409
@pravaalc8409 3 жыл бұрын
Nicely explained, but if i enter number as 2, the code does not execute. please help
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Thank you :) No it will work properly for input 2.
@pravaalc8409
@pravaalc8409 3 жыл бұрын
@@AmulsAcademy thank you. noticed indentation was not properly placed in my code
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Yes indentation matters a lot in python :)
@anshumanchoudhary2658
@anshumanchoudhary2658 Жыл бұрын
a=int(input("enter:")) if (a%2==0) or (a%3==0): print("it is not prime number") else: print("it is prime") this is write or wrong
@pillarikala266
@pillarikala266 4 жыл бұрын
Plz tell with while loop
@hetanshikothari4177
@hetanshikothari4177 4 жыл бұрын
Here i got stuck with case number =2 here 2 modulo 2 will be 0 still it prints 2 is a prime number how does that work
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
in the for loop we took range from 0 to num when num=2 range becomes 2 to 2 range(2,2) so it won't execute for loop body :) You can execute this and check for i in range(2,2): print("hello") else: print("hi")
@hetanshikothari4177
@hetanshikothari4177 4 жыл бұрын
Amulya's Academy thank you so much for the explanation!! Got it
@umairgillani699
@umairgillani699 5 жыл бұрын
how about if we want to check the list of prime numbers in a range x to y, where x and y could be any range..
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
I did make a video on how to print prime numbers in particular range please check that :)
@umairgillani699
@umairgillani699 5 жыл бұрын
@@AmulsAcademy Yes watched it. It makes a good logic. Please come up with more videos like these :)
@crewmate3031
@crewmate3031 3 жыл бұрын
Mam why did u use break. Can u tell me the use of it please 🙏🙏
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
if you want to exit from the loop then you can use break inside the loop. Execute the program without break you can see the difference :)
@crewmate3031
@crewmate3031 3 жыл бұрын
@@AmulsAcademy oo ok mam thanks
@sandeepsinghnegi9220
@sandeepsinghnegi9220 5 жыл бұрын
please help i am getting 55 as prime number. by writing below code. num= int(input("enter any number")) for i in range(2, num): if (num % i) == 0: print (num,' number is not prime') break else: print (num,' number is prime') break
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
num= int(input("enter any number")) for i in range(2, num): if (num % i) == 0: print (num,' number is not prime') break else: print (num,' number is prime') Now check whether it will give correct output or not :)
@sandeepsinghnegi9220
@sandeepsinghnegi9220 5 жыл бұрын
num = int(input("enter number to check prime number : .. ")) for i in range(2,num): if (num % i ) == 0: print (num,"not prime") break else: print(num,"number is prime")
@muskaangupta4915
@muskaangupta4915 Жыл бұрын
% k bd wala else iff k indention m aan chahiy th na jo for k nicje ku aara
@jeetgupta2286
@jeetgupta2286 4 жыл бұрын
Thank u didi ❣️❣️🙏🙏
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Most welcome 😊
@ananddarshan1114
@ananddarshan1114 2 жыл бұрын
then why the hell my program says 9 and 15 are prime number when i write the same program as yours.
@asrithavardhini956
@asrithavardhini956 4 жыл бұрын
by writing your code, for number 2 it is not showing anything..please help me
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
No it will print 2 is prime number. Give me the program i will check for you :)
@asrithavardhini956
@asrithavardhini956 4 жыл бұрын
Thanks:) it's working...👍😊
@yadavj12
@yadavj12 Жыл бұрын
Hello dear we have to find out a prime number or not means there is three conditions can you please explain those three conditions
@aryavs4555
@aryavs4555 6 жыл бұрын
may i give u a suggestion pls run the programme and show us the output it will ensure that ur codes are correct
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Thank you for the suggestion:) Didn't i show the output in this video? Usually i do execute my program. :)
@zizo8737
@zizo8737 5 жыл бұрын
Arya V S Watch the video properly she has shown the execution
@uk0707raptor
@uk0707raptor Жыл бұрын
Mam this code is not working for number 2.
@Engineer9060
@Engineer9060 2 жыл бұрын
wrong concept .plz correct it acc to uyou when i will take 21 as ainput it will show it is prime no. as 21%2==1 but 21 is not a prime nno. ur soln is for even no.
@gowthamselvaraj7793
@gowthamselvaraj7793 Жыл бұрын
Please explain Circular prime number in python mam
@bibekanandasahoo3497
@bibekanandasahoo3497 2 жыл бұрын
How I write this code in list comprehension method
@urvi23
@urvi23 2 жыл бұрын
Mam if we check no 2 how it will work?
@seaofplatitudes780
@seaofplatitudes780 Жыл бұрын
I was wondering the same thing.
@smartcat5989
@smartcat5989 Жыл бұрын
mam do you teach in valia ?
@byjusCOM-pw7xn
@byjusCOM-pw7xn 4 жыл бұрын
Ur range function is not working may I know the reason
@anusmitasamanta2608
@anusmitasamanta2608 4 жыл бұрын
amazing ...
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Thank you :)
@0SIGMA
@0SIGMA 3 жыл бұрын
TYSM!!
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Pleasure :)
@swatimaskawade5321
@swatimaskawade5321 2 жыл бұрын
can't we add int in the input statement ?🤔🤔🤔🤔🤔🤔
@ramurachineni2255
@ramurachineni2255 3 жыл бұрын
How to do same program with while loop
@ajithkumarm9446
@ajithkumarm9446 4 жыл бұрын
Mam, why are u using for loop for all program?
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
If you want you can use while loop also. :)
@munshidrahman630
@munshidrahman630 2 жыл бұрын
Tnq
@ViralFeedTv
@ViralFeedTv 4 жыл бұрын
WOW, tysm :D
@nabeelmalik.4714
@nabeelmalik.4714 4 жыл бұрын
If we use negative value then error occur...
@prasanthkrishnam62
@prasanthkrishnam62 3 жыл бұрын
How to get a preceding number of a given number
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
input-1 :)
@vickykolle8821
@vickykolle8821 5 жыл бұрын
Wt happend if we not type a break
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
you won't get proper output:) When we get divisor of given number then we know that number is not prime so we need to come out of the loop that's why we used break :)
@kairu9373
@kairu9373 3 жыл бұрын
Even or Odd and Prime or Composite numbers are different programming logics. What you are trying to imply in here is that every number divisible by 2 is not a Prime number when 9, 15, 21 and so on are not Prime numbers and are not divisible by 2. This is unclear and confusing. The way the tutorial is being discussed has never changed and is still the same as other content creators stating they found the answer behind Prime number logics.
@Engineer9060
@Engineer9060 2 жыл бұрын
you are the only one in the comment whom i found have some knowledge, other than people here are saying they are clear , its just a soln for even no. not for prime no.
@KimTae47016
@KimTae47016 Жыл бұрын
I was also confused that by using this method it will print prime statements even for odd numbers..
@itzboyon6983
@itzboyon6983 4 жыл бұрын
but if i input 2 it comes out nothing, i know it is a prime number
@rahuljuneja1185
@rahuljuneja1185 6 жыл бұрын
According to your code,it starts dividing by 2. So,2%2==0 Then according to your code,2 should not be a prime number
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
No because in the for loop range will become 2 to 2 at that time . so it won't execute for loop directly goes to else part :)
@rahuljuneja1185
@rahuljuneja1185 6 жыл бұрын
Amuls Academy Thanks.
@rohitjoshi1777
@rohitjoshi1777 4 жыл бұрын
@@AmulsAcademy Did not understood range become 2 to 2 at that time
@kryptonboron6104
@kryptonboron6104 3 жыл бұрын
Mam...it is not working for *21* . What to do? But thanks for the video mam
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
21 is not prime number right ? What is the problem ? :)
@kryptonboron6104
@kryptonboron6104 3 жыл бұрын
Mam....When I entered 21, then it checks and says that *21 is prime* . Then I again tried designing a new code for it. Thanks for your reply mam😄
@kratishrivastava6984
@kratishrivastava6984 6 жыл бұрын
plz tell me if num = 2
@AmulsAcademy
@AmulsAcademy 6 жыл бұрын
2 is a prime number:)
@babusingh7837
@babusingh7837 6 жыл бұрын
there is some mistake in your code see carefully
@kumarisonali2553
@kumarisonali2553 5 жыл бұрын
yes 2 is the smallest prime no.
@vasudevareddy6749
@vasudevareddy6749 5 жыл бұрын
@@kumarisonali2553 ,code is working fine,give lower bound as 2,then it will print including with 2
@Unidentifying
@Unidentifying 4 жыл бұрын
How to do this without using break ?
@djquick
@djquick 4 жыл бұрын
*remainder
@manuaugustine750
@manuaugustine750 5 жыл бұрын
try 15 and see what output you will get
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
15 is not prime number :)
@addictedroaster1573
@addictedroaster1573 3 жыл бұрын
Instead of this large code.. We can do.. Num modulus 2 Or 3....remainder not eaual to 0 then it's PRIME NUMBER
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
That’s what we are doing here 😊
@addictedroaster1573
@addictedroaster1573 3 жыл бұрын
@@AmulsAcademy please make video on python interview programming question.. But not mcq... Something like paragraph narrated question.... Need it because I am final year student.. Please
@Engineer9060
@Engineer9060 2 жыл бұрын
@@AmulsAcademy sry but i thinks its a wrong code bcz for 21,9 it will show prime.
@RK-jv3kw
@RK-jv3kw 3 жыл бұрын
Are u from tamil nadu ? i understood well thanks for the video
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
No I am from Karnataka. Thank you :)
@RK-jv3kw
@RK-jv3kw 3 жыл бұрын
@@AmulsAcademy i am from kerala, i can easly recognise south indains
@AmulsAcademy
@AmulsAcademy 3 жыл бұрын
Hello :)
@RK-jv3kw
@RK-jv3kw 3 жыл бұрын
@@AmulsAcademy hello
@RK-jv3kw
@RK-jv3kw 3 жыл бұрын
you are nice teacher
@SevenStepsAhead
@SevenStepsAhead Жыл бұрын
its remainder not reminder lmao
@nagarani.g1694
@nagarani.g1694 3 жыл бұрын
plese insert by with alagorithm
@ryder3099
@ryder3099 3 жыл бұрын
One correction it is remainder not reminder
@bunnysunil
@bunnysunil 5 жыл бұрын
Madam I following your classes daily I am big fan of u yesterday I attended one interview I passed written test In second round they conducted system test But they gave to me a difficult task That task name is FLAMES I HOPE YOU KNOW THAT FLAMES CONCEPT before he conduct the system test He explained to me that FLAMES Take two persons name Cancel that common letters Count the remaining Letters For example total remaining letters are:(5) How to get this out put By using ptython code Plz explain this out madam
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
Try this: str1 = input("name1:") str2 = input("name2:") for i in str1: for j in str2: if i==j: str1=str1.replace(i,"",1) str2=str2.replace(i,"",1) print(i,j) print(str1,str2) print("remaining characters in str1:",len(str1)) print("remaining characters in str2:",len(str2)) :)
@bloodbath8804
@bloodbath8804 4 жыл бұрын
while True: print(" thankyou very much")
@AmulsAcademy
@AmulsAcademy 4 жыл бұрын
Welcome :)
@r4d1calwr4th7
@r4d1calwr4th7 5 жыл бұрын
try 15 it is showing a prime no.
@AmulsAcademy
@AmulsAcademy 5 жыл бұрын
No it won't print 15 as prime number :)
Python Tutorial - Program to Print Perfect Numbers in Given Interval
12:27
Python Tutorial - Prime Numbers | Printing Prime Numbers in Given Interval
18:33
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН
黑天使遇到什么了?#short #angel #clown
00:34
Super Beauty team
Рет қаралды 46 МЛН
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 82 МЛН
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 9 МЛН
PRIME NUMBER PROGRAM IN PYTHON PROGRAMMING || PYTHON PROGRAMMING
7:45
Sundeep Saradhi Kanthety
Рет қаралды 79 М.
#25 Python Tutorial for Beginners | Prime Number in Python
4:11
Check If A Number Is Prime | Python Example
11:16
Portfolio Courses
Рет қаралды 7 М.
Leap Year Program | Python Tutorials
12:12
Amulya's Academy
Рет қаралды 76 М.
Solve any Star Pattern program in Python
18:44
Simply Coding
Рет қаралды 926 М.
Python - Print All Prime Numbers In Any Interval
6:00
Wrt Tech
Рет қаралды 44 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН