โ† Back to Grade 7 Lessons

Roblox Catalog Shop

DictionariesRoblox

Python Exercise: Roblox Catalog Shop ๐ŸŽฎ

Roblox Catalog

Exercise 1: Creating Your Catalog ๐Ÿ“ฆ

๐Ÿ“– Dictionaries ๐Ÿ”‘ Keys & Values

Part A: Create a dictionary called catalog with these Roblox items and their prices:

  • "Dominus": 50000
  • "Sparkle Time Fedora": 15000
  • "Valkyrie Helm": 25000
  • "Rainbow Wings": 8000
  • "Golden Crown": 12000

Print the entire catalog.

Part B: Print individual item prices:

  • Print the price of "Dominus"
  • Print the price of "Rainbow Wings"
  • Print the price of "Golden Crown"

Part C: Update prices (limited items went up!):

  • Increase "Dominus" price by 10000
  • Decrease "Rainbow Wings" price by 2000 (on sale!)
  • Print the updated catalog

Example Output:

=== Part A ===
{'Dominus': 50000, 'Sparkle Time Fedora': 15000, 'Valkyrie Helm': 25000, 'Rainbow Wings': 8000, 'Golden Crown': 12000}

=== Part B ===
Dominus costs: 50000 Robux
Rainbow Wings costs: 8000 Robux
Golden Crown costs: 12000 Robux

=== Part C ===
{'Dominus': 60000, 'Sparkle Time Fedora': 15000, 'Valkyrie Helm': 25000, 'Rainbow Wings': 6000, 'Golden Crown': 12000}

Try it yourself

Code: Roblox Catalog Shop

Loading Python runtimeโ€ฆ
Python โ€ฆ
Loading...
bash
$ Click "Run" to execute your code...