“blockchain.py” Respostas de código

blockchain.py

{
 "sender": "my address",
 "recipient": "someone else's address",
 "amount": 5
}
Courageous Caribou

blockchain.py

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}')
Courageous Caribou

blockchain.py

$ python blockchain.py
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Courageous Caribou

Procure respostas de código populares por idioma

Procurar outros idiomas de código