Complete the code to get the balance of an account.
balance = blockchain.get_balance([1])The get_balance function requires the account_address to return the balance of that account.
Complete the code to check if the balance is greater than zero.
if balance [1] 0: print('Balance is positive')
To check if the balance is positive, use the greater than operator > to compare with zero.
Fix the error in the code to correctly fetch the balance.
balance = blockchain.[1](account_address)The correct method to get the balance is get_balance. Other options are invalid method names.
Fill both blanks to create a dictionary of account balances for accounts with balance greater than 100.
balances = {account: blockchain.[1](account) for account in accounts if blockchain.[2](account) > 100}Use get_balance consistently to fetch balances in both places.
Fill all three blanks to create a dictionary of uppercase account names and their balances if balance is above 50.
result = {account.[1](): blockchain.[2](account) for account in accounts if blockchain.[3](account) > 50}Use upper() to convert account names to uppercase and get_balance to fetch balances consistently.