Wanzaz / calculator

Calculator which solves basic operations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Calculator

  • Create a simple calculator - program which allows entering and solving simple mathematic operations
  1. Program allows to enter 1. operand, operator and 2. operand.
  2. Entering is from keyboard or from graphic interface (buttons).
  3. Program supports only basic mathematic operations - adding, subtraction, multiplying, dividing. As operand can be entered integer or float number (as separator always use comma).
  4. Program report error, if the entered input doesn't meet the requirements

Examples

Operand 1: 10
Operator: +
Operand 2: 25
---------
Result: 35

Operand 1: 15,1
Operator: -
Operand 2: 10,1
---------
Result: 5,0

Operand 1: 10
=> Error in the input
  • If you have solved this part of the program, program extension, which allows to work with fractions not just integers and float numbers. For the enter of numbers in the form of fraction use the following record: x|y where x and y are integers and y is different from 0.

Examples

Operand 1: 1|3
Operator: +
Operand 2: 3|4
---------
Result: 13|12

Operand 1: 3|4
Operator: +
Operand 2: 5|12
---------
Result: 7|6

About

Calculator which solves basic operations

License:MIT License


Languages

Language:Python 100.0%