Computer Science, asked by sraddhakunduoli, 5 months ago

Write a program in Python display Twisted prime numbers from 1 to 200.
Hint: A number is said to be twisted prime if it is a prime number and reverse of the number is also a prime number.
Ex: 13, 31
17, 71

Answers

Answered by shashikantameher54
2

Explanation:

# Python Program to print Prime Numbers from 1 to 100

Number = 1

while(Number <= 100):

count = 0

i = 2

while(i <= Number//2):

if(Number % i == 0):

count = count + 1

break

i = i + 1

if (count == 0 and Number != 1):

print(" %d" %Number, end = ' ')

Number = Number + 1

Similar questions