⏳ Duration: 3 weeks 🎯 Goal: Build a simple calculator that runs in the terminal using Python.
- Go to your GitHub repo in the CodingClub organization
If you haven’t done this yet from Challenge 1, go back and complete Challenge 1.
- Inside your existing repo (e.g., challenge-yourName), create a new folder named:
Challenge2-Calculator
- Inside that folder, create a new Python file:
calculator.py
- Open calculator.py and add this starter code:
print("Welcome to your calculator!")
num1 = input("Enter the first number: ")
operator = input("Enter an operation (+, -, *, /): ")
num2 = input("Enter the second number: ")
# TODO: Convert numbers and perform the operation- Try running your code from the terminal:
python calculator.py✅ You should see the prompts.
⌨️ Enter numbers like 2, +, 3 and see if it prints anything (even an error — that’s part of learning!).
- Push your changes to GitHub
-
Use VS Code, GitHub Desktop, or the terminal — whichever you're comfortable with. If you don't know how to setup a python virtual evnironment or don't even know what that is, use PyCharm.
-
Make sure your Challenge2-Calculator folder and calculator.py file are committed and pushed.
✅ Repo is public and still named challenge-yourName
✅ Folder Challenge2-Calculator exists inside your repo
✅ File calculator.py exists and includes starter code
✅ Program prints a welcome message and prompts for input
✅ You can run it and get input/output in the terminal
✅ Committed and pushed to GitHub
The example above assumes you’re using Python — but this is not a requirement. You can complete the challenge in any language you're comfortable with.
If you need help:
-
Setting up your project
-
Installing an IDE
-
Using Git/GitHub
💬 Ask for help in the Discord! We're here for that.