Weekly project: unit & currency converter

Project

~150 min

The brief

Build week1/converter.py — a menu-driven command-line converter someone at a bureau de change or a logistics office could actually use. This is your first complete program: it runs, loops, converts, and quits cleanly.

Example session:

=== ORGLOBAL CONVERTER ===
1. Naira -> US Dollars
2. US Dollars -> Naira
3. Kilometres -> Miles
4. Kilograms -> Pounds
5. Celsius -> Fahrenheit
q. Quit

Choose an option: 1
Amount in Naira: 150000
₦150,000.00 = $93.75

Choose an option: q
Goodbye!

Requirements checklist

  • A menu with at least 4 conversions, which must include ₦↔USD (both directions counts as two) — use a rate constant near the top like USD_RATE = 1600 so it is easy to update
  • At least two non-currency conversions (km↔miles: ×0.621371; kg↔lb: ×2.20462; °C→°F: ×9/5 + 32)
  • The program loops — after each conversion it shows the menu again, until the user chooses q
  • Money output formatted with :,.2f and the right symbol (₦ or $)
  • Bad menu choices (e.g. 9 or banana) print a friendly message and re-show the menu instead of crashing
  • Numeric input guarded at Week-1 level: check with .isdigit() before converting where you can, or accept that truly weird input (like 12.5.3) may crash — that is acceptable this week and you should say so in a comment; proper error handling arrives later
  • Constants and variables have clear names; no single-letter mystery variables

You have not learned loops formally yet — that is Week 2. Use what the lesson materials and your own REPL experiments give you: a while True: loop with break when the user types q is the standard shape, and you are allowed to look up exactly that pattern. If ChatGPT or Claude explains it to you, fine — but you must be able to explain every line of your submission. Code you cannot explain line-by-line is not your work.

Submission

Push is not required yet (Git arrives in Week 4 — after that, every project lives on GitHub). For now, submit a link to a folder containing converter.py and a screenshot or text capture of a session showing: at least 3 different conversions, one bad menu choice handled, and a clean quit. In your notes: which requirement was hardest and why.

Reviewer checks

  • Runs with python converter.py and does not crash on normal use
  • Menu loops until q; quitting is clean
  • ₦↔USD uses a named rate constant; changing the constant changes results
  • At least 4 working conversions with correct maths (spot-check one of each)
  • Money formatted with thousands separators and 2 decimals
  • Invalid menu choice does not crash the program
  • Student can explain the loop and one conversion line when asked

Sign in to submit your work.