Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rez():
- lista_termin = []
- fajl = open("termin.txt", "r")
- for red in fajl.readlines():
- niz = red.strip().split("|")
- termin = niz[0]
- lista_termin.append(termin)
- fajl.close()
- while True:
- termin1 = input("Unesite sifru termina: ")
- if termin1 not in lista_termin:
- print("Unesta sifra ne postoji")
- else:
- rez1()
- def rez1():
- lista_red = []
- lista_kolona = []
- fajl = open("karte.txt", "r")
- for red in fajl.readlines():
- niz = red.strip().split("|")
- redovi = niz[4]
- kolone = niz[5]
- lista_red.append(redovi)
- lista_kolona.append(kolone)
- fajl.close()
- while True:
- red1 = input("Uneti broj reda (1,2,3,4,5,6,7): ")
- kolona1 = input("Unesti oznaku sedista (a,b,c,d,e,f,g): ")
- if red1 in lista_red and kolona1 in lista_kolona:
- print("Uneti red ili sediste je zauzeto: ")
- else:
- print("Uspesno ste rezervisali kartu")
- rezervacija_menu()
- def menu0():
- printmenu0()
- command = input("Izaberite komandu: ")
- while command not in ("1", "2"):
- print("Uneli ste pogrešnu komandu.")
- printmenu0()
- command = input("Izaberite komandu: ")
- return command
- def printmenu0():
- print("Da li zelite da rezervisete jos karata ?")
- print("1.Da")
- print("2.Ne")
- def rezervacija_menu():
- komanda = "0"
- while komanda != "2":
- komanda = menu0()
- if komanda == "1":
- rez()
- login.kupac_menu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement