Python sample question with answer 6

Question:
Which line of code outputs the string "invalid username" to the screen?

  1. print(invalid username)
  2. print(#invalid username#)
  3. # print("invalid username")
  4. print("invalid username")
Answer:
D - is the correct answer. The print() function outputs the object specified inside the parentheses to the screen. To output a string, it must be placed in quotation marks