2. Variables¶
Variables are references to memory regions that you define to use in the program.
The variables
F
andC
from the previous example are references to memory regions.The variables
F
andf
are different, just asC
andc
are."F"
or"C"
are not variables.
2.1. Variables with defined and undefined values¶
You can only use the content of a variable if it already has a defined value.
If you use a variable that has no defined value or is undefined, it would result in an error like the following.
4
x = 42
print(x)
print(y)
Activity: 2.1.1 ActiveCode (ac_l40_2_en)
You have attempted 1 of 2 activities on this page