C-17-Q001mediumsingle_mcq
In the program if mark >= 40: print('You have passed'), what happens when the user enters mark = 30?
In the program if mark >= 40: print('You have passed'), what happens when the user enters mark = 30?
- aThe pass message prints
- bThe body of
ifis skipped and the next statement is processed - cThe program crashes
- dThe mark is changed to 40
ব্যাখ্যা
The condition mark >= 40 evaluates to false when mark is 30, so the indented body holding print('You have passed') is not executed. Control simply moves on to the next statement after the if block without printing anything.