Обновить u8/program.py

This commit is contained in:
Arina Dohadailo 2026-11-05 23:00:44 +00:00
parent da35148606
commit 8cc69c964b

View File

@ -13,3 +13,23 @@ answer_count = 0
def bad_database():
print("Chybna databaza")
exit()
def load():
global pos, question_count, answer_count
if pos >= len(rows):
bad_database()
text = rows[pos]
pos += 1
if text == "":
bad_database()
if "?" == text[-1]:
question_count = question_count + 1
left = load()
right = load()
return (text, left, right)
else:
answer_count += 1
return (text,)