QuestionQ218

VerifiedComputer Programming and Python Fundamentals

Arrange the code boxes in the correct order to create a line of code that asks the user for an integer and assigns it to the counter variable.

Some code boxes are not needed.

Drag & Drop
counter = 
Explanation

input("Enter count:") displays the prompt and returns the entered value as text. Wrapping it with int(...) converts that value to an integer before assigning it to counter.

Community Discussion

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