So, I write the code in Python for an app that test if a number is prime and if is, it will display "X is a prime number".
--------------------------------------------
def prim(x,i=2):
if x==i:#case x=2 will return 1, the number is prime
return 1
else:
if x%i==0 or x==1: #case x%i=0 or x=1 will return 0, the number is not prime
return 0
else:
return prim(x,i+1)
#main program
sw=1
while sw==1:
print("The number is:")
x=input() #input number
if prim(x)==1: #test if the number is prime, the number is prime only if the function "prim" returned 1
print(x,"is a prime number")
else:
print(x,"is not a prime number")
print("Do you want to continue? 1=Yes; 0=No;")
sw=input()
-----------------------------------------------------------------------------------------------------------
