Answer the question
In order to leave comments, you need to log in
Why does the error pop up: TypeError: '>' not supported between instances of 'str' and 'int?
x = float(input("Введи первое число: "))
y = float(input("Введи второе число: "))
z = input("Какое действие? У нас есть: + - x : ")
def shet(a,b):
q = a + b
c = a * b
h = a / b
print(str(a) + "+" + str(b) + " = " + str(q));
print(str(a) + "x" + str(b) + " = " + str(c));
print(str(a) + ":" + str(b) + " = " + str(h));
if z == str("-"):
while (str(x) > int(0)):
print(f'{str(x)}-{str(y)}={x - y}');
x-=y
break
else:
shet(x,y);
Answer the question
In order to leave comments, you need to log in
Because you can't compare strings with numbers. What do you think is bigger letter A or number 3?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question