im new to programing and i am making my first program ( for the family ) and what i would like to do is ask a series of questions (no right or wrong answers) but record the answer so that the next time we use the program the previouse answer is there? (little bit more about the program: its basicly we have trouble figuring out what to eat and i wanted to make a program that randomly chooses a food according to the possative/negative answers given to the question and i know my wife will attempt to "break" the program by giveing acceptable but weird possative/negative answers example: yup yeah nah nope how ever i dont know the whole list of words she knows she always suprises me with newer words that are totaly correct ( and it doesnt help we are bilingual) so i want to out smart her by adding her responces to the program so that the next time she uses it the words will already be there without me having to manualy add it
is it even possible to do so? (i am no where near finished coding the program and it is my first project)
example:
import random
Order_list = ["McDonalds", "Langos(Rendeles)", "Pizza(Pasa)", "Kinai", "KFC", "Kebab", "Pizza(Forte)", "Mexicoi(Rendeles)", "Sushi", "Asiai Etelek", "Hamburger(Rendeles(nem meki/kfc))" "Pizza(Nem Pasa es nem Forte)", "Burger King"]
Stove_list = ["Carbonara", "Brassoi", "Bolognai", "Flekken", "Magvas Rantot Hus", "Curry Csirke", "Teriyaki Teszta", "Vifon Teszta", "Tojasos Nokedli"]
Oven_list = ["Rakott Teszta", "Rakott Krumpli", "Rakott Karfiol", "Rakott Kaposzta", "Mutans Hus", "Baconbe Csavart Csirke"]
Cold_lst = ["szendvics", "salata", "meleg szendvics(micro)", "Vifon Teszta"]
Available_posative_answers = []
Hungry_Q = ""
Hungry = True
while True:
Hungry_Q = input("Éhes vagy?: ").lower()
if Hungry_Q in ("igen", "yes"):
Hungry = True
if Hungry is True:
Order = input("Van pénzed rendelni?: ").lower()
if Order in ("yes", "igen", "van"):
Energy = input("Van energiád főzni?: ").lower()
if Energy in ("igen", "van", "igen van", "yes", "i do", "yes i do"):
Mood = input("Van kedved főzni?: ").lower()
if Mood in ("igen", "van", "igen van", "yes", "i do", "yes i do"):
Oven = input("Működik a sütő?: ").lower()
if Oven in ("igen", "yes"):
print("A választott étel: " + random.choice(Order_list + Oven_list + Stove_list))
break
elif Oven in ("no", "nem"):
print("A választott étel: " + random.choice(Order_list + Stove_list))
break
else:
print("Érvénytelen válasz!")
elif Mood in ("no", "nem", "nincs"):
Meleg = input("Akarsz meleg ételt enni?: ").lower()
if Meleg in ("igen", " yes"):
print("A választott étel: " + random.choice(Order_list))
break
elif Meleg in ("no", "nem"):
print("A választott étel: " + random.choice(Cold_lst))
break
else:
print("Érvénytelen válasz!")
else:
print("Érvénytelen válasz!")
elif Energy in ("no", "nem", "nincs"):
Meleg = input("Akarsz meleg ételt enni?: ").lower()
if Meleg in ("igen", " yes"):
print("A választott étel: " + random.choice(Order_list))
break
elif Meleg in ("no", "nem"):
print("A választott étel: " + random.choice(Cold_lst))
break
else:
print("Érvénytelen válasz!")
else:
print("Érvénytelen válasz!")
elif Order in ("no", "nem"):
Energy = input("Van energiád főzni?: ").lower()
if Energy in ("igen", "van", "igen van", "yes", "i do", "yes i do"):
Mood = input("Van kedved főzni?: ").lower()
if Mood in ("igen", "van", "igen van", "yes", "i do", "yes i do"):
Oven = input("Működik a sütő?: ").lower()
if Oven in ("igen", "yes"):
print("A választott étel: " + random.choice(Oven_list + Stove_list))
break
elif Oven in ("no", "nem"):
print("A választott étel: " + random.choice(Stove_list))
break
else:
print("Érvénytelen válasz!")
elif Mood in ("no", "nem", "nincs"):
print("A választott étel: " + random.choice(Cold_lst))
break
else:
print("Érvénytelen válasz!")
elif Energy in ("no", "nem", "nincs"):
print("A választott étel: " + random.choice(Cold_lst))
break
else:
print("Érvénytelen válasz!")
else:
print("Érvénytelen válasz!")
elif Hungry is False:
print("Akkor talán nem kéne enned!!!")
break
else:
break
elif Hungry_Q in ("nem", "no"):
print("Akkor talán nem kéne enned!!!")
break
else:
print("Érvénytelen válasz!")
i realy hope its possible and that the way i discribed my problem is understandable
thank you for your time and patients for reading all this but most of all thank you for your help :)