Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Snake Calculator v1.6

A versatile command-line calculator written in Python, offering a variety of mathematical operations from basic arithmetic to trigonometric functions and line equations.

Table of Contents

Features

  • Arithmetic: Addition, subtraction, multiplication, division (needs improvement in current v1.6 code).
  • Advanced Math: Square roots, cube roots, exponents, factorials, logarithms, absolute value, floor division.
  • Geometry: Area (square, triangle), perimeter, triangle angles, line equations (slope and intercept), sine calculation.
  • Unit Conversions: Fraction to decimal conversion.
  • User Interaction: Interactive command-line interface with friendly prompts and robust error handling for inputs.

Prerequisites

This is a pure Python application and requires a Python interpreter (Python 3.x recommended) installed on your system.

How to Run

  1. Save the Code: Copy the entire Python source code into a file named calculator.py.

  2. Open Terminal/Command Prompt: Navigate to the directory where you saved calculator.py.

  3. Execute the Script: Run the following command:

    python calculator.py
    # or if you have multiple versions of python installed:
    python3 calculator.py

Usage

When you run the script, the calculator will greet you and ask for your name. It will then present a menu of 15 different operations you can choose from by entering the corresponding number.

The program uses a loop so you can perform multiple calculations in one session by answering "Y" when prompted "Wanna use this program again? (Y/N)".

Example Session:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages