Question-85: If you run below code snippet, then what would be printed on console
A=10
B=12
if A>=B:
print("A is Bigger than B")
print("I dont think this so, this is correct")
else :
print("A is Smaller than B")
print("Yes, this is correct")
print("This would always be printed, whether condition is true or not")
- Nothing, there is an error in program.
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Exp: C
Exp:
If condition does not match, use else block
- If condition does not match, then do this.
- Only if condition is not true, then we always want to execute some code.
- We need to put in else block.
- If you put code outside of else block then that would be always executed. Whether condition is true or not.
-
You can access to full explanation to question and answer from this page.