Faulty calculator using Python
A faulty calculator is simply a calculator which operates simple tasks, but in some cases (set by the programmer) it gives the wrong output. You all must be wondering why do we need a faulty calculator? This type of calculator is not needed unless you want to prank someone or prove them wrong in case of some maths problem.
- First, we take input from the user that what he/she wants to do
- Then we write the code of Addition, Subtraction, Multiplication, and Division
- And lastly, we insert those cases that we want wrong results.
For normal condition
For false condition
Attention reader! Don’t stop learning now. Participate in the Scholorship Test for First-Step-to-DSA Course for Class 9 to 12 students.