Ken Schaefer
2 months ago
2 changed files with 29 additions and 1 deletions
@ -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) |
Loading…
Reference in new issue