Skip to content

MidlifeMechanicus/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This is is a calculator project for the Odin Project Foundations course. The parameters for the calculator can be found here: https://www.theodinproject.com/lessons/foundations-calculator.

Project required features:

  • add, subtract, divide and multiply functions
  • only deals with two numbers at a time
  • defaults to useing the result of previous calcultion as start of subsequent calculation
  • rounds to two decimal places to prevent overflow
  • pressing 'Clear' resets existing data
  • snarky error alert on divide by zero (yes, it specifically asked for snarky)

Extra credit features:

  • decimal button
  • backspace button
  • keyboard support

Other features (because I wanted to):

Web page is reactive; once the viewport width drops below 600px, the calculator becomes smaller, as do the fonts, and the layout of the header changes slightly. This accomodates mobile devices.

Limited the length of input numbers to eight digits. If the project wants to limit decimal places to avoid overruns, then it only makes sense to limit inputs for the same reason.

Notes on html and css layout:

I am a web developer, not a web designer. I have no interest in being a web designer. Clean, simple layouts with decent color matching are as far as I go on my own. I am more than happy to implement other people's amazing ideas, though!

About

A project for the Odin Project Foundations Course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published