DLT:
  • Use variables to store information
  • Initialize a variable
  • Reassign values to variables
  • Use the results of functions in their code
  • Request user input and respond using the input

Vocabulary:
  • Variable: Variables are used to store values at a named location in a computer's memory. Variables can have many types such as integers, strings, or booleans. To access the value in the variable, simply use the name of the variable and the name will be replaced with the value when the program is executed.
  • Variable Assignment: An instruction that assigns a value to a variable. For example, the instruction country = "USA" assigns the value "USA" to the variable country.
  • Reassigning Variables: Reassigning variables will remove the old value stored in the variable and replace it with the new value that is assigned to it.
  • Return Value: A value that a function outputs once the function has been run. This value can be stored in a variable or used in another calculation.

Activity:
  • Tynker Python 201: Variables and I/O - In this lesson, students are introduced to variables and I/O (input/output). Additionally, students will learn to use variables to store and retrieve data in Python as they solve puzzles and fix syntax errors. Due at the end of class.

input() Asks the user for a value and returns the result. The value that is returned by the function call can be stored in a variable or used in another calculation.
  • Tynker Social Studies: Presidential Timeline