2_Variables and simple data types
2_Variables and simple data types
2-1, 2-2
Strings 8
Example:
“This is a string”
"The language 'Python' is named after Monty Python, not the snake.“
• \n: newlines
• \t: tabs
Strings 12
Stripping Whitespace
2-3,…, 2.7
Numbers 15
20 mod 3
[203]
Numbers 16
Logical Operator
2-8, 2-9
Get user input 20
input() function:
• Like the print() function, input will print the string inside of the
parenthesis.
• But it will also create a box for the user to enter information.