num = int(input("Enter a number ")) if num < 2: print("Enter a number greater than 1") elif num == 2: print(" 2 is a prime number") else: for i in range(2,num): if num%i ==0: print(num,"is not a prime number") break else: print(num,"is a prime number")
@sivadhawan5798 Жыл бұрын
🤝
@nareshmote8488 Жыл бұрын
What if I check 15
@gokulkrishnayt2 жыл бұрын
crystal clear explanation!!
@nareddyaravindreddy2 жыл бұрын
Iam regularly following your lectures.. very clear thank you :)
@retroworld58422 жыл бұрын
Bro do you get the job ? Pls reply
@amitkumarchoubey2003 Жыл бұрын
Awesome 🛕🛕🕉️🕉️🌹🌹🚩🚩🙏🙏🛕🛕🌞🌞🌸🌸🌞🌞⛳⛳Sir
@marekmatusiak83972 жыл бұрын
Hello Would you be interested in doing the world's first implementation of the MMSieve prime generation method in Python?
@mandar26812 жыл бұрын
What about number 2 , it is also prime numbr
@murgan43072 жыл бұрын
Yaa that's the same quation but I think we need to follow the like m=n/2,insted of using n we can use m.
@NivasBhogapurapu11 ай бұрын
By this logic u r getting 2 as prime number only....
@seasonz75 Жыл бұрын
Sudeep sir, pls explain on number 2 which is as prime...as i tried the code you shared.
@seasonz75 Жыл бұрын
var=0 for var in range (1,26): # input 25 times - regress testing n=int(input('Enter an Integer: ')) flag=True if (n==2): print('Prime number') elif n!=2: for i in range (2,n): if(n%i==0): flag = False print('Not prime number') break else: print ('Prime number')
@sureshm86872 жыл бұрын
Hi sir Iam good in python code but some difficult programs I can't understand, where can i get solutions for easy understanding please reply
@stech5596 Жыл бұрын
what about 9 and 15 ?????
@ajaykumar-uz7qh2 жыл бұрын
hello sir. in this program the output for 1 is shows prime number. But 1 is not a prime.can you please clarify.
@puneet86692 жыл бұрын
Prime no. Have 2 factor but 1 has only one factor .that's why 1 is not prime
@shubhamneelgar196 Жыл бұрын
n=int(input("enter the number : ")) if n>1: for i in range(2,n): if(n%i)==0: print(n,"is not a prime") break else: print(n,"is a prime") break else: print(n,"is not a prime")
@chiragkumar41962 жыл бұрын
Sir upload django lectures please
@konahari3501 Жыл бұрын
if i enter 1 ,then i am getting 1 is a prime number.but 1 is not a prime number
@JosephL-g3m2 жыл бұрын
I am understand
@akshaypatil8155 Жыл бұрын
sir sochte kaise hai ki python code likha kaise jaiga????? please ispe video banaye...
@JaswanthKumar-lx6hf11 ай бұрын
how to check nearest prime number of given number
@pankajsahu9058 Жыл бұрын
incomlete code: try to enter any prime number in this code and it willl run until n-1
@deepakSharma-cf5qo4 ай бұрын
Below code is giving error in pycharm and online compiler also. Can anyone help what is the issue. num = int(input("enter the number")) count = 0 if num>1: for i in range(1,num+1): if num % i == 0: count = count+1 if count == 2: print("prime") else: print("not prime")
@bhagyamahalakshmi3492 жыл бұрын
2 is a prime
@kopparthiharika16932 жыл бұрын
How to print first 100 prime numbers sir
@sundeepsaradhi2 жыл бұрын
Our next video is on prime series Keep following our channel
@kopparthiharika16932 жыл бұрын
@@sundeepsaradhi ok sir. Thank you 😊
@ravitejagunisetti9973 Жыл бұрын
What about 2
@09.srushtibhujbal35Ай бұрын
Last minute exam preparation
@riyazbagban91902 жыл бұрын
and 3 also\
@riyazbagban91902 жыл бұрын
take 2 and explain
@Spartan17_yt10 ай бұрын
as if loop check for num..It is equal to 2.In this case if loop doesnt get executed.So flag remains false hence it returns as prime
@Stream_Wars2 жыл бұрын
Anna Nuvvu ....?
@shinysrivastava920811 ай бұрын
#wap to check if the number is prime or not num=int(input("Enter a number to check if it is prime : ")) for i in range (2,num): if n%i==0: print (num, "is not prime") break else: print ("It is prime") this is still giving 11 as "not prime" why ??