Course Content
1.
Course Intro
0 min
10 min
0
2.
Why Learn Python?
4 min
5 min
0
3.
What is the Best Software for Learning Python?
5 min
5 min
0
4.
Intro to Google Colaboratory
28 min
20 min
0
5.
Intro to Temzee Lessons
4 min
4 min
2
6.
How to Declare a Variable in Python
2 min
3 min
0
7.
Declare Variables Exercises
0 min
4 min
9
8.
Use Descriptive Variable Names
4 min
3 min
0
9.
Variable Naming Rules and Conventions
8 min
6 min
0
10.
The Print Function
4 min
3 min
0
11.
Integers and Floats
0 min
4 min
0
12.
Integers and Floats Exercises
0 min
1 min
4
13.
Familiar Arithmetic (math) Operators
0 min
2 min
0
14.
Math Operators Exercises
0 min
1 min
0
15.
Strings
0 min
11 min
0
16.
Comments in Python
0 min
4 min
0
17.
Functions in Python
0 min
26 min
0
18.
String Formatting with F-Strings
0 min
3 min
0
19.
Conditionals, Booleans, and If Statements
0 min
12 min
0
20.
Intro to Python Lists
0 min
6 min
0
21.
Intro to Python Lists - Exercises
0 min
2 min
6
22.
Lists as a Sequence of Values
0 min
6 min
0
23.
Coming Soon...
0 min
1 min
0
- Save
- Download
- Clear Output
- Runtime
- Run All Cells
Loading Runtime
Before you start
Before starting these exercises make sure you watch the following lessons:
How to check your code:
When you're done writing your code make sure you hit the "play button" on the left-hand side to execute the code. Once the code has been executed, you can test your solution to see if it's correct by hitting the "submit" button on the right-hand side of the code cell.
Exercise 1 - Create an age
variable
Create a variable called age
and assign it the value of your age in years as an integer.
You don't have to put your actual age if you don't want to, but the value you store to this variable should be:
- An integer
- Greater than 0
- Less than 120
Exercise 2 - Create a height_cm
variable
Create a variable called height_cm
and assign it the value of your age in years as an integer.
You don't have to put your actual height if you don't want to, but the value you store to this variable should be:
- An integer
- Greater than 0
- Less than 228
Exercise 3 - Create a weight_kg
variable
Create a variable called weight_kg
and assign it the value of your weight rounded to the nearest whole kilogram.
You don't have to put your actual weight if you don't want to, but the value you store to this variable should be:
- An integer
- Greater than 0
- Less than 651
Exercise 4 - Create a number_of_pets
variable
Create a variable called number_of_pets
and assign it the the number of pets owned in your household.
The value you store to this variable should be:
- An integer
- 0 or greater.
- Less than 5000. (Sorry if you actually own 5000 or more pets).
Exercise 5 - Create a number_of_cars
variable
Create a variable called number_of_cars
and assign it the value of however many cars are owned by your household.
The value you store to this variable should be:
- An integer
- 0 or greater.
- Less than 5000. (Sorry if you actually own more than 5000 cars)
Exercise 6 - create a power_level
variable
Declare a variable called power_level
and assign it the value of 9001
.
Exercise 7 - create a hardy_ramanujan
variable
Declare a variable called hardy_ramanujan
and assign it the value of 1729
.
When you're done writing your code make sure you hit the "play button" on the left-hand side to execute the code. Once the code has been executed, you can test your solution to see if it's correct by hitting the "submit" button on the right-hand side.
Exercise 8 - create an annual_salary
variable
Declare a variable called annual_salary
and assign it the value of 90000
.
Exercise 9 - reassign the annual_salary
variable a new value
Congrats! You got a raise! Re-assign the value of annual_salary
a new value of 95000
.
You can explicitly re-assign the value of a variable at any time in Python. Doing this will overwrite the previous value that was stored to the variable.