cha cha cha.. ei ku shashasha...
This commit is contained in:
parent
8ae23ccf56
commit
6528b2401e
25
shashasha.py
Executable file
25
shashasha.py
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/python3.10
|
||||||
|
|
||||||
|
from hashlib import sha256
|
||||||
|
from random import randint
|
||||||
|
|
||||||
|
runs = 400
|
||||||
|
turn = 0
|
||||||
|
start = "Hello There, friend!"
|
||||||
|
|
||||||
|
def turns_and_runs(turn, input, end):
|
||||||
|
input_bytes = input.encode()
|
||||||
|
input_hash = sha256(input_bytes)
|
||||||
|
return_blob = input_hash.hexdigest()
|
||||||
|
|
||||||
|
if turn < runs:
|
||||||
|
my_random = randint(10, 60)
|
||||||
|
end += return_blob[my_random]
|
||||||
|
return_blob = return_blob + return_blob + str(my_random)
|
||||||
|
end = turns_and_runs(turn + 1, return_blob, end)
|
||||||
|
|
||||||
|
return end
|
||||||
|
|
||||||
|
result = turns_and_runs(turn, start, '')
|
||||||
|
|
||||||
|
print(result)
|
Loading…
Reference in New Issue
Block a user