[Improve Numbers Concept] Suggestions from GitHub Issue

User @3aluw has suggestions and comments for the numbers concept and is seeking feedback and discussion. :smile: Please chime in here.

The current exercise for the Numbers Concept is Currency Exchange. An alternate (and deactivated) exercise is Electric Bill.

Link to the GH Issue. Copy of the most recent comments are below.


I was planning to post this in the forum, but I wasn’t sure which section would be the most appropriate. So, I’ll write it here for now, and once you let me know the right place to post, I can link it there as well.
This exercise is designed to introduce Python’s number operations

introduction

using only very simple, real-world math (the kind learned in primary school).

Why?

  1. Teaching math is not the main goal here— we’re teaching programming concepts.
  2. We assume students might not be familiar with Python (or programming at all),
    since this could be the 2nd or 3rd topic in their learning journey.

The previous version of the Numbers exercise mixed many operations at once
and introduced complexity that distracted from learning Python syntax.
This version takes a more gradual, beginner-friendly approach by:

  • Introducing one new operator at a time in a logical sequence.
  • Making each step small and easy to understand.

Progression of concepts covered:

  1. Addition/Subtraction (+ and -) – starting with simple calculations and service fees.
  2. Division (/) – figuring out how many bills are needed.
  3. Modulo (%) – finding leftover change when amounts aren’t exact multiples.
  4. Multiplication (*) – scaling amounts for currency conversion.
  5. Floats vs Integers – understanding when results include decimals and when they don’t


Currency Exchange :moneybag:

Follow Chandler through his day at the currency exchange machine.
Each step introduces a new function you need to create.

1. Estimate value after exchange

Context:
Chandler starts by exchanging USD for EUR. On this day, 1 USD = 1 EUR.
However, the machine charges 1 USD as a service fee and displays the EUR amount as a float.

Task:
Create the exchange_money() function, taking 1 parameter:

  • value : The amount of USD Chandler wants to exchange.

This function should return the EUR amount after subtracting the service fee.

Example:

exchange_money(100) 99.00


2. Calculate number of 10 EUR bills

Context:
Chandler now wants to insert exact amounts using 10 EUR bills.
The machine still takes 1 EUR fee, so the calculation should be done after deducting the fee.

Task:
Create the get_number_of_10_bills() function, taking 1 parameter:

  • value : The amount of EUR Chandler wants to exchange.

This function should return the number of 10 EUR bills Chandler will insert (don’t forget 1$ fee).

Example:

get_number_of_10_bills(126) 12 >>> get_number_of_10_bills(129) 13


3. Calculate change for non-multiples of 20

Context:
The machine only exchanges amounts that are multiples of 20 EUR.
Any remainder is returned as change.

Task:
Create the get_change() function, taking 1 parameter:

  • value : The amount of EUR Chandler wants to exchange.

This function should return the change amount the machine gives back.

Example:

get_change(23) 3 >>> get_change(43) 3


4. Convert EUR to Yen

Context:
Chandler decides to exchange his EUR for Japanese Yen.
The exchange rate is 1 EUR = 150 Yen.

Task:
Create the exchange_to_yen() function, taking 1 parameter:

  • value : The amount of EUR to be exchanged.

This function should return the amount in Yen as a float.

Example:

exchange_to_yen(2) 300


5. Apply additional fee for less common currency pairs

Context:
The machine charges an extra 1.3% fee for exchanging less known pairs (like EUR/Yen)

Task:
Create the apply_additional_fee() function, taking 1 parameter:

  • amount : The amount in Yen before the extra fee.

This function should return the final Yen amount Chandler gets after the fee is deducted.

Example:

apply_additional_fee(3000) 2961.0

1 Like