1/16
What is input in Python?
Information that a person gives to a program
What is a simple example of input?
Typing your name when a program asks for it.
What does input() do?
It asks for information and waits for you to type
What is a variable?
A named place that stores information.
What is a variable like?
A labelled box that holds something
What is a value?
The actual information stored in a variable
In name = "Alex", what is the variable?
name
In name = "Alex", what is the value?
“Alex”
In age = 5, what is the variable?
age
In age = 5, what is the value?
5
Why do programs use variables?
To remember information and use it later
What does the = sign do in an assignment?
It stores the value on the right in the variable on the left.
What does input() usually return?
Text (a string), even when you type a number.
If you type 5 into input(), what does Python receive?
The text "5", not the number 5.
Can a variable's value change?
Yes. You can store a different value in it later.
What does print() do?
It displays information on the screen
What happens in name = input("What is your name?")?
Python asks a question and stores your answer in name.