Return to home page

Python Quiz: Module 1

Getting Started


  1. Which of the following values are strings?
  2. Which of the following code snippets creates a reference to a constant string value?
  3. A constant can be reassigned a value in Python.
  4. What is the output of this code: name: str = input('Enter your name:')?
  5. What is the output of print(name) after the user responds to the code in Question 4?
  6. If the value of first_name is "Santa" and the value of last_name is "Clause", what is the output of print(last_name, first_Name) ?
  7. A constant named GREETING has the value 'Hello'.Write the code that outputs outputs Hello.
  8. The input command always returns a string.
  9. What is the output of print('hello','there')
  10. What is the output of print('hello'+'there')?