Skip to content

Prisc-dev/simple-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Simple Calculator

A small interactive Python calculator that asks for two numbers and an operation and prints the result.

Features

  • Supports addition (+), subtraction (-), multiplication (*), division (/), and power (^).
  • Handles invalid input and division-by-zero gracefully.
  • Interactive; type q at any prompt to quit.

Files

  • calculator.py — the interactive program.

Run locally

  1. Make sure you have Python 3 installed.
  2. From the project directory run:
python3 calculator.py

Upload to GitHub (quick guide)

  1. Create a new repository on GitHub (via the website).
  2. On your machine, open a terminal and run:
git init
git add calculator.py README.md
git commit -m "Add simple calculator program"
git branch -M main
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
git push -u origin main

Replace YOUR_USERNAME and YOUR_REPO_NAME with your GitHub username and repo name. Git may ask for credentials or open a browser to authenticate (or use a personal access token).

Alternatively, you can upload the files using GitHub's web UI (Add file → Upload files).

License

This project is released under the MIT License. Use it freely.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages