correct the python statement
Attachments:
Answers
Answered by
0
Answer:
Explanation:
as you can see the first two lines are clearly following the syntax that is truly pythonic, therefore there is no need of correction there.
come to the third line
here the if statement should have a small i as per the syntax
there should also be a colon after the condition
Now come to the else statement
here the E of Else should be small as per the syntax
and after the else word there should be a colon to denote the block of code falling in it
so the final code will be
a=100
b=20
if(a>b):
print(a)
else:
print(b)
hope it helps
Answered by
0
Answer:
There are two errors which are mentioned below:-
- if else statement should be in small letters
- Colon(:) is missing after if-else statement
If these errors are not removed it will result in Syntax error
Correct Code:-
a=100
b=20
if (a>b):
print(a)
else:
print(b)
Similar questions