Python Project
Python Project
Project Title:-
Your task is to write a program to find the
nth prime palindrome number, n is the
input user will give
prime and a palindrome..
BACHELOR OF TECHNOLOGY
Computer science and Engineering
Submitted to
Dr. Makul Mahajan
LOVELY PROFESSIONAL UNIVERSITY
PHAGWARA, PUNJAB
This is the code’s screenshot and the code of this is at the next page,
SOURCE CODE:-
print('WELCOME! What is your name?')
myName = input()
print('Hello ' + myName + ' Enter random number')
n=int(input("Enter any number: "))
#prime check
f=0
for i in range(2,n):
if n%i==0:
print(i)
f=1
break
if f==1:
print(n,"is not a prime")
else:
print(n,"is prime")
#palindrom number
x=n
sum=0
while x>0:
r=x%10
sum=sum*10+r
x=x//10
if sum==n:
print(n,"is a prime palindrom")
else:
print(n,"is not a prime palindrom")
Result page:-
Conclusion
We hope and we wish that this document will
help you to understand about our minimalist
but attractive project as I had tried something
different from usual. We had used Python
for logical.