Embercode
✕
Variables and Data TypesQuick quiz

Arguments and naming

6 questions. Covers Naming and reading declarations in Python.

Questions 1 to 5 of 6

  1. 1. Which of these raises a ValueError?
  2. 2. Which of these is a legal variable name in Python?
  3. 3. What happens when this runs? ``python print('total: ' + 0 + 12) ``
  4. 4. A user runs python3 main.py 4.5 with this code. What happens? ``python import sys n = int(sys.argv[1]) print(n) ``
  5. 5. When the user runs python3 greet.py Ana Lee, what is sys.argv[1]? Give the text only.

    Type your answer.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.