Question-86: If you run below code snippet, then what would happen?
A=10
B=12
if A>=B:
print("A is Bigger than B")
print("I dont think this so, this is correct")
print("This line should always be printed")
else :
print("A is Smaller than B")
print("Yes, this is correct")
1.
A is Smaller than B
Yes, this is correct
2.Get all Questions and Answer from here
3.You need to have paid subscription to access all questions
4.Thanks for considering Python Certification Material
Answer: E
Exp:
A=10 B=12
if A>=B: print("A is Bigger than B") print("I dont think this so, this is correct") print("Problematic line") You can access to full explanation to question and answer from this page. |
- If and else has to be continuous.
- In above program, you can see there would be an error at line “print("Problematic line")
- You can not have code which is not part of either if or else block between if-else.