Skip to content

A retro themed calculator built with HTML, CSS, and JavaScript. This project demonstrates core JavaScript logic, DOM manipulation, and event handling.

Notifications You must be signed in to change notification settings

dreams-from-dust/Faulty-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Faulty Calculator

A retro-themed calculator that demonstrates core JavaScript principles. This project simulates a "faulty" calculator where results can be intentionally incorrect, showcasing a fun application of conditional logic, DOM manipulation, and a touch of randomness.

Key Features

  • Core JavaScript Logic: The calculator utilizes JavaScript to handle user input, perform calculations, and implement its unique logic. For every calculation, the program generates a random number. If the number is less than or equal to 0.5, it returns a slightly incorrect result, demonstrating a playful application of conditional logic. If the number is greater then 0.5, the correct result is displayed. This random number is generated in the background and is not visible to the user.
  • DOM Manipulation: JavaScript is used to dynamically update the result display and show error messages based on user actions and calculation outcomes.
  • Event Handling: The calculator uses event listeners on buttons to trigger functions for calculation and resetting the interface.
  • Modern CSS: The interface is styled with a modern, retro-inspired theme using Google Fonts and a dark color palette. The layout is responsive, ensuring usability on both desktop and mobile devices.
  • Robust Error Handling: The JavaScript includes checks for invalid number inputs, incorrect operators, and prevents errors like division by zero.

Technologies Used

  • HTML5
  • CSS3
  • JavaScript (ES6+)

Getting Started

Simply clone this repsitory to your local machine and open the index.html file in your web browser.

About

A retro themed calculator built with HTML, CSS, and JavaScript. This project demonstrates core JavaScript logic, DOM manipulation, and event handling.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published