I wanna do this but i got 3 issues a s I commented:
age = input("How old are you ? ")
if type(age) != int: # this line does't work
restart = input("invalid input. Do you want to restart ? [y/n]")
if restart == "y" :
#restart the program
else :
#exit the program