todella vähän parempi shashasha

This commit is contained in:
kalzu 2023-05-25 22:47:04 +03:00
parent 6528b2401e
commit dc393eecf5

View File

@ -1,4 +1,8 @@
#!/usr/bin/python3.10 #!/usr/bin/python3.10
"""
This is simple script that gives out quite random chars.
Like we almost won eurovision.
"""
from hashlib import sha256 from hashlib import sha256
from random import randint from random import randint
@ -7,6 +11,7 @@ runs = 400
turn = 0 turn = 0
start = "Hello There, friend!" start = "Hello There, friend!"
def turns_and_runs(turn, input, end): def turns_and_runs(turn, input, end):
input_bytes = input.encode() input_bytes = input.encode()
input_hash = sha256(input_bytes) input_hash = sha256(input_bytes)
@ -20,6 +25,7 @@ def turns_and_runs(turn, input, end):
return end return end
result = turns_and_runs(turn, start, '')
result = turns_and_runs(turn, start, "")
print(result) print(result)