GithubHelp home page GithubHelp logo

gurknathe / web-based-scientific-calculator-cs480- Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 792 KB

A simple web calculator.

CSS 10.16% HTML 56.86% JavaScript 32.98%
calculator-javascript testing-automation

web-based-scientific-calculator-cs480-'s Introduction

CS480 - Lab 3: Calculator

How to run the program:

(Assuming you have unzipped the lab files into the same directory as the README.md file)
  • With the HTML file that is in the same folder as this file, open the HTML file in Chrome, Firefox, Edge, or Opera*.
    • You can either double click on the index.html file or right click on the index.html file and select "Open with" and select the browser from there.
    • For terminal/command lines, navigate to the location where index.html is located in the terminal/command line:
      • Tested methods:
        • Windows Command Prompt: "index.html"
        • Window PowerShell: ".\index.html"
        • Git Bash: "start index.html"
        • Anaconda Powershell Prompt: "index.html"
        • Bash: "start browsername index.html" (only worked with firefox for me)
      • Untested methods:
        • Ubuntu: "firefox index.html"
        • Ubuntu: "google-chrome index.html"
        • (Couldn't find anything for MacOS)
  • The HTML file will have a text box at the top. Enter the expression you want to calculate in the text box and hit the enter key or click the = sign at the bottom right. The image should look like this.
  • If the expression is valid, the text box will display the result of the calculation.
    • If the answer is NaN, that means the expression returned as undefined (i.e. โˆž, -โˆž, or an unevaluatable expression like 0/0).
  • If the expression is invalid, the text box will display an error message:
    • "Invalid expression!"
    • "No expression entered."
    • Expression highlighted in red from the point of the error in the expression.
  • The Clear button will clear the text box.
  • The Total Clear button will clear the text box and the history.
  • The Delete button deletes the rightmost character in the text box.

Notes:

  • The calculator only handles the functions displayed on the UI.
  • I have not tested this on MacOS or Linux, so I don't know if it will display properly.
* The Opera browser functions properly, but the UI is not displayed correctly.

web-based-scientific-calculator-cs480-'s People

Contributors

gurknathe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.