Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import os
- import random
- quantity = int(input("Ilość znaków do memo: "))
- signs = 'abcdefghijklmnoprstuwz'
- start_time = time.time()
- memo = ''
- if quantity > 22:
- quantity = 22
- while quantity > 0:
- randomsign = random.choice(signs)
- print(randomsign)
- input('Enter')
- os.system("cls")
- memo = memo + randomsign
- signs = signs.replace(randomsign, '')
- quantity -= 1
- memory = input('Podaj litery w odpowieniej kolejności:')
- end_time = time.time()
- czas = str(end_time - start_time)
- if memory == memo:
- print('Gratulacje, udało ci się zapamiętać w: ' + czas)
- else:
- print('Niestety znaki są niepoprawne')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement