Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import time
- print('o-orzeł')
- print('r-reszka')
- print('0-zakończenie gry')
- gracz=0
- komputer=0
- while True:
- wybor=input('Twój wybór to: ')
- if wybor=="0":break
- elif wybor=='r':wybor='reszka'
- elif wybor=='o':wybor='orzeł'
- else:
- print("Dokonaj prawidłowego wyboru")
- print('o-orzeł')
- print('r-reszka')
- print('0-zakończenie gry')
- continue
- rzut=random.choice(["orzeł","reszka"])
- time.sleep(3)
- print(f'Wynik rzutu: {rzut}')
- if wybor==rzut:
- gracz+=1
- else:
- komputer+=1
- print("Wyniki łącznie")
- print(f'Komputer: {komputer}')
- print(f'Użytkownik: {gracz}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement