Types & Arithmetic
Try to answer the following questions without typing them in to the PyCharm console, as you would on an exam or quiz.
- Given the following values, what are their types:
- True
- ‘True’
- 3 + 7j
- 34,756
- 98.7
- “98.7”
- “NY Giants”
- If the following statements are executed in order, what will be the values of each variable?
- d = 7
- c = 3
- p = c / d
- q = d // c
- r = d % c
- z = 5 * r ** q
- What would be an appropriate name and data type for the following variables:
- The name of the Super Bowl MVP
- The number of Vince Lombardi trophies a team has won
- The average number of touchdown passes per game
Solutions to Questions