Python sample question with answer 8
Question:
Which of the following lines of code assigns the variable username a value of "jrafael"?
- "jrafael" = username
- print(username, "jrafael")
- username = "jrafael"
- print("jrafael", username)
Answer:
C - is the correct answer. The syntax for assigning a variable requires a name for the variable, then an equals sign (=), and finally the value for the variable