QuestionQ72

VerifiedControl Structures and Iteration

What is the final value of x when Python runs the following control loop?

Question Image

Explanation

range(4, 20, 2) generates values starting at 4 in increments of 2 and excludes its stop value, 20. Its final generated value is 18.

Community Discussion

No comments yet. Be the first to start the discussion!