Primary exercises
Create a new variable.
Make a variableheightInMeters
that contains your height expressed in meters.
Print the variable.
Find the variable and its value in the Environment pane.Use a variable in an expression.
Use the variableheightInMeters
to calculate your height in cm.
Calculate the height in cm once again and store the result in a variableheightInCentimeters
.
Show/printheightInCentimeters
.Change a value of a variable.
Increase the height stored inheightInMeters
by 0.1m.
Check whether the value of the variable indeed changed.
Has the value ofheightInCentimeters
also changed? Why?Typo in variable name.
Observe the error shown when you try to print a variable but you make a typo in the variable name.