Does anyone happen to know why my python if statement is not working? Whenever the input menu comes up and I put a 1, nothing happens.
import random
submenu=0
age=random.randint(16, 20)
if age>=18:
submenu==int(input("\nWhat would you like to do? \n 1:Buy real estate \n 2:Buy a car\n :"))
if submenu==1:
print("You have bought real estate")
Aucun commentaire:
Enregistrer un commentaire