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

Quizzes

Quick multiple-choice questions shared by teachers and students.

+ Create a Quiz

Pick a subject to see its topics.

Exam:
136 quizzes
Why does a simulation of crosses call `random.seed(5)` at the top? New
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer, Simulation and Randomness
PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
A plant is AAIi. What different gametes does this print? `from itertools import product; print(sorted(set("".join(p) for p in product("AA", "Ii"))))` New
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer, Simulation and Randomness
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
Axial flowers (A) are dominant over terminal ones (a). What does this print? `from collections import Counter; kids = [a + b for a in "Aa" for b in "aa"]; print(len(Counter(kids)))` New
High School (11–12), High School (9–10), Undergraduate, General · Biology by Computer, Simulation and Randomness
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
Iron burns in chlorine. What does this print? `rounds = {"Fe": 0.45, "Cl2": 0.35}; print(min(rounds, key=rounds.get))` New
High School (11–12), High School (9–10), Undergraduate, General · Chemistry by Computer
PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
What does len("".split(" ")) give?
High School (11–12), High School (9–10), Undergraduate, General · Testing and Debugging
Board Exam, PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
def gen() has yield 1 and then yield 2. What does sum(gen()) give?
High School (11–12), High School (9–10), Undergraduate, General · Comprehensions, Iterators and Generators
PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
it = iter([5, 6, 7]). After one next(it), what does list(it) give?
High School (11–12), High School (9–10), Undergraduate, General · Comprehensions, Iterators and Generators
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
What is {w: len(w) for w in ["hi", "sun"]}?
High School (11–12), High School (9–10), Undergraduate, General · Comprehensions, Iterators and Generators
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
What is [x for x in range(10) if x % 3 == 0]?
High School (11–12), High School (9–10), Undergraduate, General · Comprehensions, Iterators and Generators
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
What is "Asha:72".split(":")[1], and what type is it?
High School (11–12), High School (9–10), Undergraduate, General · Files and Data Formats
Board Exam, PCEP (Python Institute), PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
A program opens notes.txt in mode "w" and calls f.write("hi\n") three times. How many lines does the file have?
High School (11–12), High School (9–10), Undergraduate, General · Files and Data Formats
Board Exam, A-Level, PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
class V has __init__(self, x) and __add__(self, o) returning V(self.x + o.x). What is (V(2) + V(5)).x?
High School (11–12), High School (9–10), Undergraduate, General · Inheritance and Special Methods
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
len() works on objects of your own class only if the class has one special method. Which one?
High School (11–12), High School (9–10), Undergraduate, General · Inheritance and Special Methods
PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
A child that extends its parent: B(A) writes hi() as "B" + super().hi(), and the parent A answers "A". What comes back from B().hi()?
High School (11–12), High School (9–10), Undergraduate, General · Inheritance and Special Methods
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
class A has hi(self) returning "A". class B(A): pass. What does B().hi() give?
High School (11–12), High School (9–10), Undergraduate, General · Inheritance and Special Methods
A-Level, IB, PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
class Counter has the class attribute total = 0. c1 = Counter(), then c1.total = 5. What is Counter.total?
High School (11–12), High School (9–10), Undergraduate, General · Classes and Objects
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
Objects you already use: what does print(type([1, 2]).__name__) show?
High School (11–12), High School (9–10), Undergraduate, General · Classes and Objects
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
An Account opens with 500. Then deposit(200), and withdraw(900) is refused because it is more than the balance. What is the balance?
High School (11–12), High School (9–10), Undergraduate, General · Classes and Objects
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
class Box has __init__(self, n) with self.n = n. After a = Box(3) and b = Box(5), what is a.n + b.n?
High School (11–12), High School (9–10), Undergraduate, General · Classes and Objects
A-Level, IB, PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
commands = {"hi": greet}, where greet is a function. What does commands["hi"]() do?
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
ranked = sorted([("Asha", 72), ("Ravi", 85), ("Meera", 64)], key=lambda p: -p[1]). What is ranked[0][0]?
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects
PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
What does print(" Hello World ".strip().lower()) show?
High School (9–10), High School (11–12), Undergraduate, General · Text Processing
Board Exam, PCEP (Python Institute), PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
A shift of 1 in the letter code: what is chr((ord("z") - ord("a") + 1) % 26 + ord("a"))?
High School (9–10), High School (11–12), Undergraduate, General · Text Processing
Board Exam, PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
count() counts pieces that do not overlap. What does print("banana".count("an")) show?
High School (9–10), High School (11–12), Undergraduate, General · Text Processing
Board Exam, PCEP (Python Institute), PCAP (Python Institute)
StemPy LabStemPy Lab
Easy
Splitting at a comma: what does print(len("a,b,,c".split(","))) show?
High School (9–10), High School (11–12), Undergraduate, General · Text Processing
Board Exam, PCEP (Python Institute), PCAP (Python Institute)
StemPy LabStemPy Lab
Medium
Page 1 of 6

Showing 1–25 of 136