QuestionQ2

VerifiedComputer Programming and Python Fundamentals

Place the code boxes in the proper order to create a line of code that prompts the user for an integer and assigns it to the depth variable.

Some code boxes are not needed.

Drag & Drop
depth 
Explanation

input() obtains the user’s response as text, and int() converts that response to an integer before it is assigned to depth. The prompt text is supplied to input(); float( and == do not create the required integer assignment.

Learn more

Community Discussion

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