Apr-21-2019, 05:24 PM
you should use a functions like this -
def name(): name_program = input("Please enter you name: ") return name_program def age(repeat): if not repeat: age_program = input("Please enter your age: " ) return age_program else: age_program = input("Then what is it again? " ) return age_program def country(): country_program = input("Please enter you location: ") return country_program def Main(): name_program = name() age_program = age(False) print("Hello " + name_program + " so your " + age_program + " years old?") while True: yes_no_program = input("yes or no? ") if yes_no_program == "yes": print("Wow that's great") break elif yes_no_program == "no": age_program = age(True) print("Hello %s, so your %s years old" %(name_program, age_program)) print("anyways") country_program = country() print("so you come from " + country_program + " heard it's a nice place") Main()