Browse Source

blockchain

master
Ken Schaefer 2 months ago
parent
commit
e6b0b976b4
  1. 13
      2-basics/blockchain.py
  2. 17
      README.md

13
2-basics/blockchain.py

@ -0,0 +1,13 @@
blockchain = []
def get_last_blockchain_value():
return blockchain[-1]
def add_value(transaction_amount, last_transaction=[1]):
blockchain.append([last_transaction, transaction_amount])
add_value(5.3)
add_value(2.8, get_last_blockchain_value())
print(blockchain)

17
README.md

@ -1,3 +1,18 @@
# py-practical-guide # py-practical-guide
Code from the uDemy course Code from the uDemy course
## Section 2 - Basics
Components of the BlockChain
- Data (coins)
- The Chain
Data Types
- Integer
- Float
- Boolean
- Strings

Loading…
Cancel
Save