Unit 3: Variables & the European Monetary Union

Einleitungstext ...

Information: Concept of Variables

💡 Understanding Variables — Let’s Get Familiar!

Before jumping into the Snap! projects on variables and the European Monetary Union, let’s take a moment to understand the concept of variables.

🧠 What are Variables?

Variables are a core concept in Computer Science, and they help us store and manage data in our programs. Think of variables as storage containers where we can keep information. Each variable has a unique name, and we can store a value in it.

These values aren’t limited to just numbers. You can store all sorts of data, like:

  • Words 📝

  • Characters 🔤

  • Images 🖼️

  • Even commands 🛠️!

The great thing about variables is that you can access their values anytime, and you can even change them while the program is running!

cupboard

📦 A Simple Analogy: Variables as Drawers

Imagine that variables are like drawers in a large cupboard. Each drawer has a unique label to help you easily find it. You can:

  • Put something in the drawer 🏷️

  • Check what’s inside 👀

  • Modify its contents 🔧

  • Or replace what’s in it entirely 🔄


💰 Example: The Bank Account Drawer

Let’s say you have a drawer labeled "bank account". At the start of your program, you assign it a value of 100€ — this means there are 100€ in your bank account.

  • Later, you receive a 50€ payment.

  • You check the "bank account" drawer to see what’s inside — 100€.

  • Then, you add 50€ to the amount already in the drawer, making it 150€.

  • Now, when you open the "bank account" drawer again, you’ll find the updated value: 150€!

You can continue to modify and use this variable throughout the program for different purposes. 📊


📝 Summary:

  • Variables store data with a unique name.

  • You can access, modify, and replace the data inside a variable at any point.

  • The drawer analogy makes it easy to visualize how variables work!

Ready to dive into the Snap! projects and apply your understanding of variables to the European Monetary Union? Let's go! 🚀

💳 Snap! Project: Building a Bank Account with Variables

Welcome to your next challenge — Building a Bank Account with Variables! 🏦

In this exercise, you’ll learn how to use variables to create a simple bank account in Snap!. This is a great way to practice how variables help you store and update information dynamically — a key concept in programming! 🔑


🎯 What You’ll Learn:

  • How to create and use variables to store and manage information.

  • How to update the bank account balance dynamically as transactions occur.

  • The fundamentals of using Snap! programming to model real-world concepts!


🛠️ Getting Started

1. Open the Starter Project

Click the link below to open the Snap! Bank Account Variables Project:

🔗 Bank Account Variables Project


2. Watch the Tutorial Video 🎥

Follow along with the video tutorial to build your project step by step. The tutorial will guide you through each part of the process, helping you understand how to set up and use variables in your bank account system.

Test yourself

variables 1

variables 2

variables 3

interest rates

Snap! project "The Euro (€): A Unifying Currency for Europe"

The Euro (€) isn’t just a currency — it’s a symbol of economic unity for over 377 million people across 20 EU Member States. Before the Euro, businesses and individuals had to deal with multiple currencies, making trade across Europe much more complex. In this exercise, we’ll look back at the challenges before the Euro’s introduction and explore how it simplifies trade and promotes economic cohesion.


🌍 Scenario: A Taste of Europe

Imagine it’s 1992. The European Economic Community (EEC) — the precursor to the European Union — has already worked on removing customs duties, setting common food safety standards, and making trade between countries easier.

You live in France and have decided to sell a "Culinary Week Pack", featuring authentic specialties from seven European countries. Each pack includes these items and their cost in the local currency of 1992:

  • France: Coq au vin, baguette, and cognac – 37 French francs (FRF)

  • Spain: Paella and sangria – 500 pesetas (ESP)

  • Italy: Lasagne and limoncello – 3,000 lire (ITL)

  • Germany: Bratwurst, sauerkraut, and beer – 11 German marks (DEM)

  • Belgium: Waffles and Jenever – 89 Belgian francs (BEF)

  • Greece: Moussaka, tzatziki, and ouzo – 400 drachmas (GRD)

  • Ireland: Cod and Guinness – 2.89 Irish pounds (IEP)


💼 Your Challenge

To sell the "Culinary Week Pack" and cover all your costs (including labor, shipping, and currency exchange fees) while making a profit, you decide to set the selling price at two and a half times the total cost of all items.

Since you’ll be selling the packs in seven countries, you need to:

  1. Calculate the total purchase cost for each pack in your local currency (FRF).

  2. Convert the total cost into the selling price in the currency of each country.

  3. Display the results clearly and organize the information.


🖥️ The Task: Automate the Calculation

Instead of doing all these calculations manually, you’ll use Snap! to create a program that:

  1. Adds up the purchase costs in each country’s currency.

  2. Converts the total costs into your desired selling price using exchange rates.

  3. Displays the results in a neat, clear, and easy-to-read format.


🔗 Getting Started

We’ve provided a nearly complete project for you to work on! Open the following link to start:

🔗 Snap! Cost Calculation (Starter Project)

Your task is to complete the project by making the necessary adjustments in three specific areas:


📝 Step-by-Step Instructions

  1. "Costs" Object

    • Examine the left script and focus on the costume blocks and variable assignments.

    • Make sure each variable correctly represents the cost of an item in its respective currency.

  2. "Calculate" Object

    • Locate the "join reporter" blocks and fill in the empty inputs with the right variables or operators.

  3. "Retail" Object

    • Some input values for displaying results are missing or incorrect.

    • Correct these values so the final display of costs and selling prices is both accurate and visually appealing.


💭 Reflection Question

After completing the task, think about the advantages the Euro has brought to businesses like yours. How does having a single currency make pricing and trade easier and more efficient?


🆘 Need Help?

If you get stuck or want to check your work, you can always find the solution here:

🔗 Solution: Snap! Cost Calculation

Test yourself

Quiz 1

Quiz 2

Quiz 3