Print(“enter the first number”) x=float(input()) print(“enter the second number”) y=float(Input()) if(x=y): print(“both are equal”) elseif(x>y) print (x, “is greater”) else: liprint(y, “is greater)
find the errors
Answers
Answered by
4
Corrected Programme:-
print("Enter the first number:")
x = float(input())
print("Enter the second number:")
y = float(input())
if (x == y):
print("Both are equal")
elif (x > y):
print(x, "is greater")
else:
print(y, "is greater")
The Error:-
- Line 1: Invalid character '“' (U + 201C).
- Line 3: Invalid character '“' (U + 201C).
- Line 4: Name 'Input' is not defined.
- Line 5: Invalid syntax '='.
- Line 6: Invalid character '“' (U + 201C).
- Line 7: Invalid syntax 'else if'.
- Line 8: Invalid character '“' (U + 201C).
- Line 9: Name 'liprint' is not defined, Invalid character '“' (U + 201C), and EQL while scanning string literal.
Explore More:-
Python is a powerful high-level, object-oriented programming language. It was created by Guido van Rossum. It was launched in 1991. It can connect to the database system, it can also read and modify files. Python works on different platforms like Raspberry Pi, Linux, Mac, Windows and many more platforms.
Similar questions