how to create prime number program in python

preview_player
Показать описание
how to create prime number program in python

Follow Me On Social Media

Instagram (Guaranteed Replies :)) -

#PythonProgramming #PrimeNumbers #Algorithm #CodingTutorial #LearnToCode #TechTutorial #ProgrammingTips #PythonTips #python #PythonTutorial #CodeNewbie #CodingCommunity #ProgrammingInPython #ComputerScience #Mathematics #PythonCode #CodingChallenge #CodeForFun #STEM #ProgrammingLanguages #DataScience #ArtificialIntelligence #CodingInPython #PythonDevelopment #SoftwareDevelopment
Рекомендации по теме
Комментарии
Автор

Sir, can you please explain why the else statement is not alligned with if? normally when we write if statement, then else comes directly under it, but here we have not given any indentation. why

justinabosco
Автор

Thanks sir my project now complete,
I only observe the program and apply it in my program but i use while loop
Like this :
x = int(input("enter number:"))
y =2
while y<x:
if x % 2 == 0:
print("Not ptime")
break
y +=1
else:
print("prime")

Ronaxt
Автор

When given 1 as input its printing prime

CharanCherry-uync
Автор

9, 15, 21 its returns comment as prime

natarajankv
Автор

This program is wrong not applicable for all number

saisamatham
Автор

This code is wrong
i have tried it change 2 and print statements to even and odd the it will work😂

sushelan_
Автор

Sorry sir this code isn't correct

md.alaminrahamanmollick