Skip to content
This repository was archived by the owner on May 25, 2022. It is now read-only.

Even or odd and Prime or nor-prime #558

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Even or Odd and Prime or not
Check Number is odd or  Even
And also chech 
This number Prime or Not
  • Loading branch information
prajwalkedari authored Dec 26, 2021
commit 1d10f6fd51255b1d43f2ff2ea5cb4e222a702f62
25 changes: 25 additions & 0 deletions projects/Odd or Even and Prime or Not/Main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


'''
Name: Prajwal Kedari
Country:India
GitHub: prajwalkedari , prajwal-kedari
Link: https://www.github.com/prajwalkedari/
Source: Python-world
Thank!!!
''''

num = int(input("Enter a number: "))
if (num % 2) == 0:
print(f"{num} is Even")
else:
print(f"{num} is Odd")
if num > 1:
for i in range(2, int(num/2)+1):
if (num % i) == 0:
print(num, "is not a prime number")
break
else:
print(num, "is a prime number")
else:
print(num, "is not a prime number")