Skip to content

Latest commit

 

History

History
82 lines (47 loc) · 2.04 KB

File metadata and controls

82 lines (47 loc) · 2.04 KB

🗓️ Coding Club Challenge Series

🟦 Challenge 2: Command-Line Calculator

⏳ Duration: 3 weeks 🎯 Goal: Build a simple calculator that runs in the terminal using Python.

🔧 What You’ll Do

  1. 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.

  1. Inside your existing repo (e.g., challenge-yourName), create a new folder named:
Challenge2-Calculator
  1. Inside that folder, create a new Python file:
calculator.py
  1. 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
  1. 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!).

  1. 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.


📌 Submission Checklist

✅ 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

📝 NOTE:

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.