exercise.py
Python/01_beginner_level/exercise.py
information = [
{
"region": "Asia",
"countries": ["China", "India", "Japan", "South Korea", "Indonesia"],
"payments": [
{
"year": "2023",
"rank_a_payment": [100, 500, 1000, 2000, 3000],
"rank_b_payment": [50, 250, 500, 1000, 1500],
"rank_c_payment": [25, 125, 250, 500, 750],
"rank_d_payment": [10, 50, 100, 200, 300],
"rank_e_payment": [5, 25, 50, 100, 150]
},
{
"year": "2024",
"rank_a_payment": [100, 500, 1000, 2000, 3000]
"rank_b_payment": [50, 250, 500, 1000, 1500]
"rank_c_payment": [25, 125, 250, 500, 750]
"rank_d_payment": [10, 50, 100, 200, 300]
"rank_e_payment": [5, 25, 50, 100, 150]
},
{
"year": "2025"
"rank_a_payment": [100, 500, 1000, 2000, 3000]
"rank_b_payment": [50, 250, 500, 1000, 1500]
"rank_c_payment": [25, 125, 250, 500, 750]
"rank_d_payment": [10, 50, 100, 200, 300]
"rank_e_payment": [5, 25, 50, 100, 150]
}
]
},
{
"region": "Europe",
"countries": ["Germany", "France", "Italy", "Spain", "United Kingdom"],
"payments": [
{
"year": "2023",
"rank_a_payment": [100, 500, 1000, 2000, 3000],
"rank_b_payment": [50, 250, 500, 1000, 1500],
"rank_c_payment": [25, 125, 250, 500, 750],
"rank_d_payment": [10, 50, 100, 200, 300],
"rank_e_payment": [5, 25, 50, 100, 150]
},
{
"year": "2024",
"rank_a_payment": [100, 500, 1000, 2000, 3000]
"rank_b_payment": [50, 250, 500, 1000, 1500],
"rank_c_payment": [25, 125, 250, 500, 750]
"rank_d_payment": [10, 50, 100, 200, 300],
"rank_e_payment": [5, 25, 50, 100, 150]
},
{
"year": "2025",
"rank_a_payment": [100, 500, 1000, 2000, 3000]
"rank_b_payment": [50, 250, 500, 1000, 1500]
"rank_c_payment": [25, 125, 250, 500, 750]
"rank_d_payment": [10, 50, 100, 200, 300]
"rank_e_payment": [5, 25, 50, 100, 150]
}
},
{
"region": "North America",
"countries": ["United States", "Canada", "Mexico", "Brazil", "Argentina"],
"RankA_Payment": [100, 500, 1000, 2000, 3000],
"RankB_Payment": [50, 250, 500, 1000, 1500],
"RankC_Payment": [25, 125, 250, 500, 750],
"RankD_Payment": [10, 50, 100, 200, 300],
"RankE_Payment": [5, 25, 50, 100, 150],
},
{
"region": "South America",
"countries": ["Brazil", "Argentina", "Chile", "Peru", "Colombia"],
"RankA_Payment": [100, 500, 1000, 2000, 3000],
"RankB_Payment": [50, 250, 500, 1000, 1500],
"RankC_Payment": [25, 125, 250, 500, 750],
"RankD_Payment": [10, 50, 100, 200, 300],
"RankE_Payment": [5, 25, 50, 100, 150],
},
{
"region": "Australia",
"countries": ["Australia", "New Zealand", "Fiji", "Papua New Guinea", "Solomon Islands"],
"RankA_Payment": [100, 500, 1000, 2000, 3000],
"RankB_Payment": [50, 250, 500, 1000, 1500],
"RankC_Payment": [25, 125, 250, 500, 750],
"RankD_Payment": [10, 50, 100, 200, 300],
"RankE_Payment": [5, 25, 50, 100, 150],
},
{
"region": "Africa",
"countries": ["Nigeria", "Egypt", "South Africa", "Kenya", "Algeria"],
"RankA_Payment": [100, 500, 1000, 2000, 3000],
"RankB_Payment": [50, 250, 500, 1000, 1500],
"RankC_Payment": [25, 125, 250, 500, 750],
"RankD_Payment": [10, 50, 100, 200, 300],
"RankE_Payment": [5, 25, 50, 100, 150],
},
{
"region": "Antarctica",
"countries": ["Antarctica"],
"RankA_Payment": [100, 500, 1000, 2000, 3000],
"RankB_Payment": [50, 250, 500, 1000, 1500],
"RankC_Payment": [25, 125, 250, 500, 750],
"RankD_Payment": [10, 50, 100, 200, 300],
"RankE_Payment": [5, 25, 50, 100, 150],
},
]
Articles liés
01_getting_started.py
01_getting_started.py — python source code from the Python learning materials (Python/01_beginner_level/01_getting_started.py).
Lire l'article →02_core_syntax.py
02_core_syntax.py — python source code from the Python learning materials (Python/01_beginner_level/02_core_syntax.py).
Lire l'article →03_control_flow.py
03_control_flow.py — python source code from the Python learning materials (Python/01_beginner_level/03_control_flow.py).
Lire l'article →04_data_structures.py
04_data_structures.py — python source code from the Python learning materials (Python/01_beginner_level/04_data_structures.py).
Lire l'article →05_functions.py
05_functions.py — python source code from the Python learning materials (Python/01_beginner_level/05_functions.py).
Lire l'article →06_error_handling.py
06_error_handling.py — python source code from the Python learning materials (Python/01_beginner_level/06_error_handling.py).
Lire l'article →