PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ***********************************
# BEFORE RUNNING READ BELOW FIRST
# ***********************************
# FOR THIS TO WORK, ENTER YOUR FIRST NUMBER IN FIRST INPUT LINE, YOUR MATH OPERATOR(+,-,*,/)IN SECOND INPUT LINE AND YOUR 2ND NUMBER IN THIRD INPUT LINE
#this is my first ever mini calculator that i programmed, feel free to comment and suggest edits and help me make it better
#Version 2; removed ZeroDivisionError by Try/except method
operators = ["+" , "-" , "*" , "/"]
#1st input line. write any number
num_1 = (float(input("First number : ")))
print (num_1)
#2nd input line. write a math operator (+,-,*,/)
op_input = input("Math operator : ")
print (op_input)
#3rd input line. write any number
num_2 = (float(input("Second number : ")))
print (num_2)
#decoration
print ("*------*\n|RESULT|\n*------*")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run