Post

@Python_Dv Answer: D) None (no output).
Because x = 7 is odd, x % 2 == 0 is False, so the if block doesn’t run at all. Both print() lines are inside the if, so nothing gets printed.
English

@Python_Dv D. None. This isn’t a loop, it’s a conditional statement asking if 7 % 2 == 0, which it is not. 7 % 2 == 1. Since the IF condition fails, nothing is output. The lack of any output is not None, it’s just no output at all. In Python, None is not nothing.
English

@Python_Dv D None
In order for the code to work you need an “else” statement before the last print
English

@Python_Dv D) None is the right answer.
The value x = 7 and if x%2==0 then print the answer here if block will not excute and else block is not given so answer is none.
English

@Python_Dv No output. When 7 is divided by 2, the remainder is 1 and not 0, therefore, the if clause is not met. As a result, none of the print statements are executed. Mind it None is a keyword in Python so None is not the correct answer.
English

@Python_Dv None because else statement is not there
English

@Python_Dv Error there is no else statement
English






























