Select the correct output for the following Python code. for I in range (6, 1, -2) :
Select the correct output for the following Python code.
for I in range (6, 1, -2) :
print (end = '*$$')
Show answerHide answer
Correct answer: (C) *$$*$$*$$
Explanation
range(6, 1, −2) gives 6, 4 and 2, so the loop runs 3 times. print(end='*$$') prints only '*$$' with no newline, giving *$$*$$*$$.