How to check prime number and palindrome in a same code ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to check prime number and palindrome in a same code ?

19th Jul 2020, 9:43 PM
Mayuri Vikram Deshmukh
2 Answers
+ 3
Write two functions, call them both.
19th Jul 2020, 9:46 PM
HonFu
HonFu - avatar
+ 2
bool(ispalindrome(x), isprime(x))
19th Jul 2020, 11:42 PM
madeline
madeline - avatar