OneCompiler

Python programs error

Please tell me where the mistake is

x=int(input("Enter value 1: ")
y=int(input("Enter value 2: ")
z=int(input("Enter value 3 : ")
if(x>y)and(x>z):
print(x," is largest among three values")
if(y>x)and(y>z):
print(y," is largest among three values")
else:
print(z," is largest among three values")

STDIN
2
5
6

Output:
File "Hello world.py" ,line 2
y=int(input("Enter value 2:"))
^
Syntax error:invalid syntax

2 Answers

4 years ago by

Hi, Could you post the OneCompiler code link? So that we can execute and see.

4 years ago by Karthik Divi

x = int(input("Enter value 1: "))
^
you forgot ur parenthsis