Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- liczba =random.randrange(1,100)
- print(liczba)
- los_1 =input ('podaj liczbę z zakresu 1-100: ')
- if int(los_1) == liczba:
- print ("trafiłeś")
- elif int(los_1) > liczba:
- print ('mniej')
- los_2 =input ('podaj liczbę (zostały 4 próby): ')
- else:
- print('więcej')
- los_2 =input ('podaj liczbę (zostały 4 próby): ')
- if int(los_2) == liczba:
- print ("trafiłeś")
- elif int(los_2) > liczba:
- print ('mniej')
- los_3 =input ('podaj liczbę (zostały 3 próby): ')
- else:
- print('więcej')
- los_3 =input ('podaj liczbę (zostały 3 próby): ')
- if int(los_3) == liczba:
- print ("trafiłeś")
- elif int(los_3) > liczba:
- print ('mniej')
- los_4 =input ('podaj liczbę (zostały 2 próby): ')
- else:
- print('więcej')
- los_4 =input ('podaj liczbę (zostały 2 próby): ')
- if int(los_4) == liczba:
- print ("trafiłeś")
- elif int(los_4) > liczba:
- print ('mniej')
- los_5 =input ('podaj liczbę (została 1 próba): ')
- else:
- print('więcej')
- los_5 =input ('podaj liczbę (została 1 próba): ')
- if int(los_5) == liczba:
- print ("trafiłeś")
- else:
- print('pudło')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement