if a == b :
print("Equal")
else :
print("Not Equal")
if a > b :
print("a is larger")
else :
print("b is larger")
Python will display an error indicating that == should be replaced with = |
||
Python will display an error indicating that an if statement cannot reside inside the body of an else |
||
Python will display an error indicating that there is a problem with the indentation |
||
No error will be displayed |
2. Given the following code snippet:
MIN_SPEED = 45
MAX_SPEED = 65
speed = 55
if not (speed < MAX_SPEED) :
speed = speed - 10
if not (speed > MIN_SPEED) :
speed = speed + 10
print(speed)
what output is produced?
The correct answer is -
Python will display an error indicating that there is a problem with the indentation
The correct indentation should be as follows -
======================================================================
The correct output should be 55
Get Answers For Free
Most questions answered within 1 hours.