Types & Arithmetic

Try to answer the following questions without typing them in to the PyCharm console, as you would on an exam or quiz.

  1. Given the following values, what are their types:
    1. True
    2. ‘True’
    3. 3 + 7j
    4. 34,756
    5. 98.7
    6. “98.7”
    7. “NY Giants”
  2. If the following statements are executed in order, what will be the values of each variable?
    1. d = 7
    2. c = 3
    3. p = c / d
    4. q = d // c
    5. r = d % c
    6. z = 5 * r ** q
  3. What would be an appropriate name and data type for the following variables:
    1. The name of the Super Bowl MVP
    2. The number of Vince Lombardi trophies a team has won
    3. The average number of touchdown passes per game

Solutions to Questions