Search
Contents
4.
Data and Variables
4.
Data and Variables
¶
4.1. Values and Data Types
4.1.1. More On Strings
4.1.2. More On Numbers
4.1.3. Check Your Understanding
4.2. Type Conversion
4.2.1. Check Your Understanding
4.3. Variables
4.3.1. Assigning Values
4.3.2. Evaluating Variables
4.3.2.1. Try This
4.3.3. Reassigning Variables
4.3.4. Check Your Understanding
4.4. More on Variables
4.4.1. Naming Python Variables
4.4.1.1. Compare
4.4.2. Keywords
4.4.3. Cool Tricks
4.4.4. Check Your Understanding
4.5. Statements and Expressions
4.6. Operators
4.6.1. Math Operators
4.6.1.1. The
//
Operator
4.6.1.2. The
%
Operator
4.6.2. Check Your Understanding
4.7. Order of Operations
4.7.1. Don’t Panic
4.7.2. Check Your Understanding
4.8. Other Operators
4.8.1. Updating Variables
4.8.2. String Operators
4.8.2.1. Try It!
4.8.3. Check Your Understanding
4.9. User Input
4.9.1. Requesting Data
4.9.1.1. Syntax
4.9.1.2. Try It!
4.9.2. Using the Collected Data
4.9.3. Critical
input
Detail
4.9.4. Check Your Understanding
4.10. Exercises: Data & Variables
4.10.1. Part A - Printing to the Console
4.10.2. Part B - Using Variables
4.10.3. Part C - User Input
4.11. Project: Data & Variables
4.11.1. Before You Start
4.11.2. Declare and Assign Variables
4.11.3. Collect User Input
4.11.4. Mass Calculations
4.11.5. Generate the Checklist
4.11.5.1. Example Output
4.11.6. Show Off Your Code
←
3.5.
Welcome, New Coder
4.1.
Values and Data Types
→