Lesson Objectives
- to review Python knowledge, use of input() and print()- to understand data types - int, float and string
Starter
Recap
print() function
The print function prints information to the screen.
print (“Hello World”)
print (“Hello World”)
input() function
The input function allows the user to enter information into the computer.
name = input("Hi. What's your name? ")
print ("Hello, ", name)
Variables
A variable is used in a program to store information.
In the program above the variable is name.
Because the variable is in quotes “” or ‘’, the variable type is called a string.
In the program above the variable is name.
Because the variable is in quotes “” or ‘’, the variable type is called a string.
No comments:
Post a Comment