Which for the statement will you use to print the multiplication table of 17
A. for I range 1,10,17
B. for I range 10,1,17
C. for I range 17,171,17
D.none
Answers
Answer:
I think answer is None of the above
Explanation:
I hope this gonna help You :)
Correct question:
Which for statement will you use to print the multiplication table of 17?
A. for i in range(1,10,17)
B. for i in range(10,1,17)
C. for i in range(17, 171, 17)
D. None
Answer:
(C) for i in range(17, 171, 17) will be the right statement to use.
Reason:
If you take A, the step value given is 17, but the start and stop values given are 1 and 10 respectively, and there aren't enough values to skip by 17. Hence nothing will be displayed.
If you take B, the start-value given is 10 and the stop-value, 1 making it practically impossible to traverse through. Hence, again, nothing will be displayed.
If you take C, the start-value is 17, and the stop-value is 171, and the step-value is 17, meaning that the table will be displayed between the numbers 17 and 171 which is still a valid output.