Skip to content

[Numbers]: Rethink/Redesign Second Round #3299

Open

Description

@BethanyG

We're opening this issue to address problems with our two Numbers concept exercises, Currency Exchange and Electric Bill.

The Challenge: Come up with something better

Please use this issue to propose rewrites | restructuring | changes in story to one or the other of these exercises, along with any revisions you'd make to the numbers concept itself. Feel free to link to a PR for these suggestions. Keep in mind the PR will be auto-closed, but we will reopen any PRs that propose solid solutions to our issues. Our ultimate goal is to get either or both exercises to a state where we can all be comfortable / happy with them as numbers concept exercises for the track.

We don't want suggestions on re-working our concept tree or how teach math. We are also very aware of typos, mistakes, and spelling errors. While correcting them is important, that's not what we want here

Instead, we'd like to know what you would do to fulfill the requirements of writing this numbers concept exercise in a way that doesn't raise significant complaints, create confusion for students on the Python track, and is consistent with the intent of concept exercises, and their requirements. Keep in mind that this is the 2nd or 3rd exercise for the track, and many features of Python cannot be used at this stage, including other modules, loops, comprehensions, lists, tuples, sets, and so forth.

We are also not (at this time) interested in copying another tracks exercise, story or concept. We're interested is solving the issues with what we currently have.

Thank you very much for your ideas and support! 🌟

Activity

  1. pinned this issue on Dec 26, 2022
  2. changed the title [-][Numbers]: Rethink/Redesign Number Two[/-] [+][Numbers]: Rethink/Redesign Second Round[/+] on Dec 26, 2022
  3. 3aluw commented on Aug 15, 2025

    @3aluw

    Hello, I have some suggestions to improve the exchange machine exercise. Would you prefer that I share them here or on the forum?

  4. BethanyG commented on Aug 15, 2025

    @BethanyG
    MemberAuthor

    Hi @3aluw,

    Thanks for asking. 🙂 (and for wanting to give feedback on an exercise!)

    Whichever place you are most comfortable with. We recommend the forum, because you'll get more visibility and feedback from other track maintainers and students. But I'm fine with you putting your ideas here.

    You can also put your ideas here & link to this issue in the forum.

  5. 3aluw commented on Aug 16, 2025

    @3aluw

    Hello;
    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.
  6. 3aluw commented on Aug 16, 2025

    @3aluw

    Currency Exchange 💰

    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
  7. BethanyG commented on Aug 16, 2025

    @BethanyG
    MemberAuthor

    Hi @3aluw,

    Thank you for your thoughtful comments and suggestions. I've created a forum thread for this under Python-->Programming. Hopefully others will chime in there. 😄

  8. 3aluw commented on Aug 28, 2025

    @3aluw

    Hello @BethanyG,

    since there haven’t been any negative comments on the suggested exercise, would it be okay if I go ahead and create a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions