From Barista to Pythonista: A Determined (but lazy) Programmer’s Guide to Acing the PCEP Certification Exam (Long)

Scott Priestley
16 min readJan 6, 2023

Part 4 (Final) — Variables, Formatting and Modules

Photo by Markus Spiske on Unsplash

I hope prepping for the Python Institute PCEP exam has been going well for you and you’re not starting to see images like above in your sleep! In our final installment we’re going to take a deeper look into variables, formatting and modules to get you prepped for the exam. This is a big one so take your time and make sure you understand each section before you move on.

In Python, a variable is a name that refers to a value. Variables are used to store information that you can later access and manipulate. You can think of a variable as a label for a value.

For example, consider the following Python code:

message = "Hello, World!" print(message)

In this code, the variable message is assigned the string value “Hello, World!”. When the print() function is called, it prints the value of the message variable.

How do you create variables in Python?

To create a variable in Python, you need to give it a name and assign it a value. You can do this using the assignment operator =.

--

--

Scott Priestley

20 year veteran of the Software Wars; Top Writer in Productivity. Also writing about Technology Trends and Small Business success.