Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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}')
Comment

blockchain.py

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

blockchain.py

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

PREVIOUS NEXT
Code Example
Python :: sns regplot make the line and confidence interval thicker 
Python :: python generate sine wave pyaudio 
Python :: len range 
Python :: ffff in decimal python 
Python :: max sum slice python 5 - autopilot 
Python :: Can the string find method be used to search a list? 
Python :: pytorch pad to square 
Python :: pandas 3d set camara cords 
Python :: least square fit straight line python 
Python :: pvector python processing 
Python :: terneray operator in python 
Python :: keep calm and carry on memes 
Python :: where are spacy models stored 
Python :: python addition 
Python :: django froms 
Python :: start application from python 
Python :: inverting a dictionary 
Python :: pandas first row to header 
Python :: create a pandas dataframe 
Python :: get member by id discord py 
Python :: django rest framework viewset 
Python :: python remove last 4 characters from string 
Python :: leetcode solutions python 
Python :: python global variables 
Python :: python string to boolean 
Python :: list slicing reverse python 
Python :: Matching a pattern in python 
Python :: how to debug python code in visual studio code 
Python :: python os.walk 
Python :: python instagram bot 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =