Blockchain.py
{
"sender": "my address",
"recipient": "someone else's address",
"amount": 5
}
Courageous Caribou
{
"sender": "my address",
"recipient": "someone else's address",
"amount": 5
}
from hashlib import sha256
x = 5
y = 0 # We don't know what y should be yet...
while sha256(f'{x*y}'.encode()).hexdigest()[-1] != "0":
y += 1
print(f'The solution is y = {y}')
$ python blockchain.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)