Great! So far we’ve looked at:
- Print statements
- How to create, modify, and use variables
- Arithmetic operations like addition, subtraction, division, and multiplication
- How to use comments to make your code easy to understand
- Different data types, including strings, ints, floats, and booleans
- Converting between data types
Here are a few more resources to add to your toolkit:
Make sure to bookmark these links so you have them at your disposal.
Instructions
Let’s apply all of the concepts you have learned one more time!
Create a variable called skill_completed
and set it equal to the string "Python Syntax"
.
Create a variable called exercises_completed
and set it equal to 13
. Create another variable called points_per_exercise
and set it equal to 5
.
Create a variable called point_total
and set it equal to 100
.
Update point_total
to be the original value plus the result of multiplying exercises_completed
and points_per_exercise
.
Add a comment above your declaration of points_per_exercise
that says:
The amount of points for each exercise may change, because points don't exist yet
Print a string to the console that says:
I got X points!
with the value of point_total
where X
is.