Обновить u8/program.py
This commit is contained in:
parent
cc07657bbb
commit
340edfb920
@ -4,7 +4,22 @@ sys.stdout.reconfigure(encoding="utf-8", newline="\n")
|
||||
sys.stdin.reconfigure(encoding="utf-8")
|
||||
|
||||
print("Expert zo zoo to vie.")
|
||||
print()
|
||||
|
||||
data = sys.stdin.read()
|
||||
print(repr(data))
|
||||
lines = data.split("\n")
|
||||
if lines and lines[-1] == "":
|
||||
lines.pop()
|
||||
|
||||
if "" not in lines:
|
||||
print("Chybna databaza")
|
||||
sys.exit()
|
||||
|
||||
sep = lines.index("")
|
||||
base = lines[:sep]
|
||||
choices = lines[sep + 1:]
|
||||
|
||||
print("Pocet otazok: 0")
|
||||
print("Pocet odpovedi: 1")
|
||||
print("Odpovedajte 'a' pre prvu moznost alebo 'n' pre druhu moznost.")
|
||||
print(base[0])
|
||||
print("Koniec")
|
||||
Loading…
Reference in New Issue
Block a user