Calculator that takes 3 user inputs: operation signs and numbers 1-5 spelled out. Then it converts them to numbers and symbols. Users can input them in any order. The problem is in my for loops in functions i(1-3) the only input that works is one any other doesn't convert to a number or symbol.
dictt = {
'one': 1,
'two': 2,
'three': 3,
'four': 4,
'five': 5,
'add': r"+",
'subtract': r"-",
'multiply': r"*",
'divide': r"/"
}
def i1():
i1 = (input("Please input 'add', 'subtract', 'multiply', 'divide', 'one', 'two', 'three' , 'four', or 'five': "))
num1=0
for k,v in dictt.items():
if i1 == k:
num1 = dictt[k]
return num1
def i2():
i2 = (input("Please input 'add', 'subtract', 'multiply', 'divide', 'one', 'two', 'three' , 'four', or 'five': "))
num2=0
for k,v in dictt.items():
if i2 == k:
num2 = dictt[k]
return num2
def i3():
i3 = (input("Please input 'add', 'subtract', 'multiply', 'divide', 'one', 'two', 'three' , 'four', or 'five': "))
num3=0
for k,v in dictt.items():
if i3 == k:
num3 = dictt[k]
return num3
def main():
x=i1()
y=i2()
z=i3()
listo=[x,y,z]
listn=[]
for i in listo:
if i == int:
listn.append(i)
listo.remove(i)
else:
pass
if len(listn) == 2:
if listo[0] == "add":
result=listn[0]+listn[1]
return f"{listn[0]} + {listn[1]} = {result}"
elif listo[0] == "subtract":
result = listn[0] - listn[1]
return f"{listn[0]} - {listn[1]} = {result}"
elif listo[0] == "multiply":
result=listn[0] * listn[1]
return f"{listn[0]} * {listn[1]} = {result}"
elif listo[0] == "divide":
result=listn[0] / listn[1]
return f"{listn[0]} / {listn[1]} = {result}"
elif len(listn) < 2:
return "not enough numbers"
elif len(listo) != 1:
return "just one operator"