StudyToCert

All certifications / PCEP / Lessons

PCEP – Certified Entry-Level Python Programmer PCEP-30-02 · Domain 1: Computer programming and Python fundamentals

Literals: Boolean, integer, float, scientific notation and string literals

▶ Watch the overview video

Last reviewed September 30, 2026 · Leer en español

A literal is a value written directly in your code, such as 42, 3.5, "cat" or True. The way you write it decides its type, which you can check with the built-in type() function. PCEP tests whether you can recognise each kind of literal on sight and predict its type, because type decides what operators do with the value. Literals are different from variables: x is a name that refers to a value, while 42 is the value itself.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study PCEP for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the PCEP study plan