mercredi 29 janvier 2020

input is a int and variable is a string, I want a action if the string is greater that the int in the if statement. python3.8

input is a int and variable is a string, I want a action if the string is greater than the int in the if statement. I'm using python 3.8

name = input ("What is your name?")

print(name)

# print ("Yes or No")
age= input ("how old are you?")


if age >= 50:
    print (name, "You are looking good for your age!")
else:
    print(name, "You are getting old.")

print("Peace Out")

Aucun commentaire:

Enregistrer un commentaire