Instructions
A variable is a name that stores a value. In Python you create one with the assignment operator =, for example score = 100. In this practice you will work with four data types:
- int (integer): a whole number with no decimal point, such as
15or-7 - float: a number with a decimal point, such as
3.75or42.0 - str (string): text inside quotes, such as
"Maria"or'12-34-56' - bool (boolean): either
TrueorFalse(capital first letter, no quotes)
How this works
- Enter your first name, last name initial, and class period, then click Start Assignment. Your start time is recorded.
- The assignment opens in a Python editor with three files (tabs). Fill in every orange dashed box.
- Click ▶ Run to see what Python would print in the terminal. Run does not tell you if you matched the instructions, so check your work carefully.
- When you finish all three tabs, click Submit for Score. Your end time is recorded and your score appears. Answers cannot be changed after submitting.
| Part | Task | Points |
|---|---|---|
| 1 | Fill in the values from a student record | 8 |
| 2 | Identify the data type of each variable | 8 |
| 3 | Write complete variable statements | 8 |
| Total | 24 |
Student Information
Task: Use the student record below to fill in each value. Pick the correct data type for each one (quotes for strings, a decimal point for floats,
True/False for booleans).NameMaria
Age (whole number)15
GPA3.75
Currently enrolled?Yes
Grade level (whole number)10
Locker combination (text)12-34-56
Has a lunch pass?No
Height in feet5.4
Task: Each variable has already been created. Use the drop down at the end of each line to choose the data type Python would report with
type().Task: Read each comment and type the complete line of Python on the empty line below it: variable name,
=, and the value. Use the exact variable name given.TerminalProblemsOutput