QuestionQ28

Python/PyEZ

What is the proper Python script syntax for prompting a user for input?

  • A hostIP = input("Device IP address: ")
  • B hostIP = input{Device IP address: }
  • C hostIP = input"Device IP address: "
  • D input("Device IP address: ") = hostIP
Explanation

In Python, input() is called with parentheses around a quoted prompt string, and its returned value can be assigned to a variable using =.

Community Discussion

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