diff --git a/2-basics/blockchain.py b/2-basics/blockchain.py new file mode 100644 index 0000000..48cb4db --- /dev/null +++ b/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) \ No newline at end of file diff --git a/README.md b/README.md index 5c1a17b..76bf36b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ # py-practical-guide -Code from the uDemy course \ No newline at end of file +Code from the uDemy course + +## Section 2 - Basics + +Components of the BlockChain + +- Data (coins) +- The Chain + +Data Types + +- Integer +- Float +- Boolean +- Strings +