0
0
Blockchain / Solidityprogramming~30 mins

Why DeFi reimagines finance in Blockchain / Solidity - See It in Action

Choose your learning style9 modes available
Why DeFi Reimagines Finance
📖 Scenario: Imagine you want to understand how Decentralized Finance (DeFi) changes the way money works. DeFi uses blockchain technology to create financial services without banks. In this project, you will build a simple program that shows how DeFi can track users' digital wallets and their balances.
🎯 Goal: You will create a small program that stores wallet addresses and their balances, set a minimum balance to qualify for a reward, find wallets that meet this condition, and then display those wallets. This helps you see how DeFi can manage money transparently and automatically.
📋 What You'll Learn
Create a dictionary with wallet addresses and their balances
Add a minimum balance threshold variable
Use a dictionary comprehension to find wallets with balances above the threshold
Print the qualifying wallets and their balances
💡 Why This Matters
🌍 Real World
DeFi platforms track users' digital wallets and balances to offer loans, rewards, or interest automatically without banks.
💼 Career
Understanding how to manage and filter data like wallet balances is useful for blockchain developers and financial software engineers working with DeFi applications.
Progress0 / 4 steps
1
Create wallet balances dictionary
Create a dictionary called wallets with these exact entries: '0xA1B2C3': 1500, '0xD4E5F6': 800, '0x123ABC': 2300, '0x789DEF': 400
Blockchain / Solidity
Need a hint?

Use curly braces {} to create a dictionary with wallet addresses as keys and balances as values.

2
Set minimum balance threshold
Create a variable called min_balance and set it to 1000 to represent the minimum balance required for a reward
Blockchain / Solidity
Need a hint?

Just create a variable and assign the number 1000 to it.

3
Find wallets above minimum balance
Use a dictionary comprehension to create a new dictionary called qualified_wallets that includes only wallets from wallets with balances greater than or equal to min_balance
Blockchain / Solidity
Need a hint?

Use {key: value for key, value in wallets.items() if condition} format to filter wallets.

4
Display qualified wallets
Write a print statement to display the qualified_wallets dictionary
Blockchain / Solidity
Need a hint?

Use print(qualified_wallets) to show the result.