Answer the question
In order to leave comments, you need to log in
Error: ''Name 'c' is not defined''. Why is that?
Gives an error:
Traceback (most recent call last):
File "/Users//Desktop/Python/file2.py", line 10, in
print ("Result: " + str(c))
NameError: name 'c' is not defined
Variable ''c'' is non-Russian, checked.
what = input('Что делаем? (+,-):' )
a = float(input ("Введи первое число: "))
b = float(input ("Введи второе число: "))
if what == "+":
с = a + b
print ("Результат: " + str(c))
elif what == "-":
с = a - b
print ("Результат: " + str(c))
else :
print ("Выбрана неверная операция!")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question