Python Special Programs - Prime Number

preview_player
Показать описание
Python Programming: Python Special Programs - Prime Number
Topics discussed:
1. Python Program to print the Prime Number.

Music:
Axol x Alex Skrindo - You [NCS Release]

#PythonByNeso #PythonProgramming #PythonPrograms
Рекомендации по теме
Комментарии
Автор

Kindly continue this series of python programming I HAVE LEARNT A LOT. I wish to donate if you increase the frequency of new python concept at least 3 videos in a week❤

handle_gc
Автор

I did one of these in C++ using Rabin Miller primality test. I wrote a class to operate on large numbers like a few hundred digits and overloaded the standard operators like +-/%* to make it easier on the eyes. And it works. I think python has a large number library also (no need to write one) and you may be able to code one for ultra large numbers with Rabin Miller.

colinmaharaj
Автор

But what if my input is 2
I mean if num=2
It gives the result that "2 is not prime"

PraveenKumar-ymjp
Автор

Num = int(input("Enter a Number to check prime are not:"))
if Num == 2:
print(f"{Num} is a prime number")
elif Num % 2 == 0:
print(f"{Num} is not a Prime number")
else:
print(f"{Num} is a prime Number")

This is simple naa ...

tharunkumar