x=input("Enter the first integer")
y=input("Enter the second integer")
if x>y:
var=x/y #here it show the error
print (var)
print ("here x is greater than y")
print ("Normal division is done")
elif x<y:
var=x//y
print (var)
print ("here y is greater than x")
print ("Modular division is done")
Here is the output error
Enter the first integer22 Enter the second integer2
Traceback (most recent call last):
File "modulodiv.py", line 6, in <module>
str=x/y
TypeError: unsupported operand type(s) for /: 'str' and 'str'
Should i use any other variable or something else and not getting the output as is should compare both the user input and do the normal division or modular division based on which is greater than another