21 lines
421 B
Python
Executable File
21 lines
421 B
Python
Executable File
import time
|
|
import sys
|
|
import random
|
|
import string
|
|
|
|
target = 'Hello, World!'
|
|
guess = list('*'*len(target))
|
|
|
|
for i, c in enumerate(target):
|
|
while True:
|
|
cc = random.choice(string.ascii_letters + string.punctuation + " ")
|
|
guess[i] = cc
|
|
sys.stdout.write(f"\r{''.join(guess)}")
|
|
sys.stdout.flush()
|
|
time.sleep(0.01)
|
|
if cc == c:
|
|
break
|
|
|
|
print('\n\nACCESS GRANTED')
|
|
|