Define Integer Literals (Exercise)
00:00 The first exercise will test your ability to define integers in Python using their literal form. It would help to remember what integer literals are. If you have the Python Basics book lying around on your desk, then you can flip to chapter five for more details.
00:16
You can also look this information up in the online Python glossary or a plethora of resources on the internet. Here are your instructions. You need to write a program that creates two variables, num1
and num2
.
00:30
Both num1
and num2
should be assigned the integer literal 25000000
, one written with underscores and one without.
00:39
Then print num1
and num2
on two separate lines.
00:44 I’ll let you think this through by yourself. Now before moving on to the next lesson where we’ll solve this exercise together.
Become a Member to join the conversation.