Answer the question
In order to leave comments, you need to log in
Why is there an error and how to fix it?
x=float(input())
y=float(input())
c=input()
if c == '+':
print (float(x+y))
if c == '-':
print(float(x-y))
if c == '/':
print (float(x/y)
if c == 'mod'and y!=0
print(x%y)
elif:
print ('Деление на 0!')
if c == 'pow':
print(float(x**y))
if c == 'div':
print(float(x//y))
else c == "*":
print(float(x*y))
Failed test #1 of 37. Runtime error
File "jailed_code", line 11
print(x%y)
^
SyntaxError: invalid syntax
Answer the question
In order to leave comments, you need to log in
The colon in the conditional expression is missing, the indentation is wrong.
what's with the code? it is not readable
x=float(input())
y=float(input())
c=input()
if c == '+':
print (float(x+y))
if c == '-':
print(float(x-y))
if c == '/':
print (float(x/y)
if c == 'mod' and y!=0:
print(x%y)
else:
print('Деление на 0!')
if c == 'pow':
print(float(x**y))
if c == 'div':
print(float(x//y))
else c == "*":
print(float(x*y))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question