HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClassesGroups

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Blog

Account

  • Dashboard
  • My Content
  • Profile
  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Prepare for an exam
  2. /Python Certification
Exam preparation

Python Certification preparation

PCEP and PCAP from the Python Institute: practice questions and problems on every topic, answers explained.

484 questions · 256 problems

With a Standard plan

Paper pattern

The PCEP and PCAP exams follow this pattern.

The real exam: PCEP is 30 questions in 40 minutes and PCAP 40 questions in 65 minutes; both need 70% to pass.

Question sets

No timer. Work at your own pace.

  • Python ProgrammingComprehensions, Iterators and Generators: Check Your Understanding10 questions
  • Python ProgrammingFiles and Data Formats: Check Your Understanding10 questions
  • Python ProgrammingInheritance and Special Methods: Check Your Understanding10 questions

Practice questions and problems

Hardest first. Try each one on paper before you see the answer.

Python Programming

Questions

  • HardA student writes [print(n) for n in numbers] to show each number. What is the problem?
  • HardA program saves its data with open("data.json", "w") at the start of every run, before it loads the old data. What is the problem?
  • HardA function def naturals(): n = 1; while True: yield n; n = n + 1. A student writes list(naturals()). What happens?

Preparing for another exam?

  • JEE Main
  • JEE Advanced
  • NEET
  • Olympiads
  • Board Exams
  • SAT
  • AP
  • A-Level
  • IB
Python Programming
Classes and Objects: Check Your Understanding
10 questions
  • Python ProgrammingWorking with Text: Concept Check10 questions
  • Python ProgrammingRecursion: Check Your Understanding10 questions
  • All Python Certification question sets →

  • Hardclass Shape: def area(self): raise NotImplementedError. class Blob(Shape): pass. What happens with Blob().area()?
  • HardA student writes class Team: def __init__(self, members=[]): self.members = members. t1 = Team() and t2 = Team(). After t1.members.append("Asha"), what does t2.members show?
  • More Python Programming questions for Python Certification →

    Problems with worked solutions

    • HardWrite an endless generator primes() that gives 2, 3, 5, 7, 11,..…
    • HardWhat does statistics.mean([]) do? Write safe_mean(values) that gives None for an empty list and the…
    • HardThe secret is mjqqt. The letter q appears twice, so the rule guesses that q stands for e…
    • HardIs "A man a plan a canal Panama" a palindrome, if we ignore spaces and capital letters? …
    • HardThis function never stops, and Python ends it with a RecursionError. Why? Fix it.
    More Python Programming problems for Python Certification →
    • All 199 PCEP (Python Institute) problems →
    • All 57 PCAP (Python Institute) problems →
    • All 374 PCEP (Python Institute) questions →
    • All 136 PCAP (Python Institute) questions →