HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_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 →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental 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
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy

Quizzes

Quick multiple-choice questions shared by teachers and students.

+ Create a Quiz

Choose a topic to see its subtopics.

Exam:
325 quizzes
A list of words is to be sorted by length, and words of the same length in alphabetical order. The key is missing. Which key, put in place of ____, makes the program print ['fig', 'date', 'kiwi', 'apple']?
High School (11–12) · Functions
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Hard
A program writes three lines to a file, then adds up the lines that are numbers. A line that is not a number counts as 100. What does the program print?
High School (11–12) · Files and Data Formats
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
A lambda takes a default value from a variable that changes later. What does the program print?
High School (11–12) · Functions
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Medium
Three scopes use the name level: the module, a function task, and a function step written inside task. What does the program print?
High School (11–12) · Functions
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Hard
One call of pair makes two inner functions that use the same variable. What does the program print?
High School (11–12) · Functions
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Advanced
A function returns a lambda that remembers the number it was made with. What does the program print?
High School (11–12) · Functions
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Medium
Each option makes a small anonymous function with lambda, and most of them also call it at once. Which options have the value 6, a plain integer? Choose every correct option.
High School (11–12) · Functions
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Hard
A product code is sliced, searched and changed in three ways. What does the program print?
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Medium
This program should print bat, but it stops with an error. Which change to the second line makes the program print bat?
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Medium
A string with spaces and dashes is cleaned and then split in two ways. What does the program print?
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Hard
A five-letter string is sliced with a negative step. Which of these slices give the string cba? Choose every correct option.
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Hard
A line of text is to be cut at its first = sign only. One line of the program is missing. Which line, put in place of ____, makes the program print name | Ada=Lovelace?
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Hard
One string holds escape sequences, and another is written over two lines with triple quotes. Which of these expressions are True? Select all that apply.
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Medium
Four string methods work on the same text. What does the program print?
High School (11–12) · Strings
Class 12 BoardPCAP (Python Institute)+3APA-LevelIB+1
StemPy LabStemPy Lab
Advanced
A loop divides 12 by each value of a tuple. What happens when the program runs?
High School (11–12) · Errors and Exceptions
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Medium
A loop raises three exceptions: a class with no brackets, an object with a message, and a KeyError object. What does the program print?
High School (11–12) · Errors and Exceptions
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
A function reads box[key] and reports which error it met, if any. What does the program print?
High School (11–12) · Errors and Exceptions
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
A failed conversion is caught, and the exception object is kept in a variable. Which of these expressions are True? Select all that apply.
High School (11–12) · Errors and Exceptions
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
A bill of 100 is shared between a number of people. The helper counts each failure and then passes the error on with a bare raise. What does the program print?
High School (11–12) · Errors and Exceptions
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Advanced
A program reads numbers from the keyboard until the input ends. The user types 5, then -2, then 9, and then closes the input, so there are no more lines. What does the program print?
High School (11–12) · Errors and Exceptions
Class 12 BoardPCAP (Python Institute)+1A-LevelPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
A program starts with two import lines. Each option below is then run as the next line of the program, on its own. Which lines run with no error? Choose every correct option.
High School (11–12) · Modules and Libraries
Class 12 BoardPCAP (Python Institute)+1APPCAP (Python Institute)
StemPy LabStemPy Lab
Medium
A program imports the random module and then uses its name again for a number. What happens when the program runs?
High School (11–12) · Modules and Libraries
Class 12 BoardPCAP (Python Institute)+1APPCAP (Python Institute)
StemPy LabStemPy Lab
Medium
A program imports the math module and tests five results of its functions. Which of these expressions are True? Select all that apply.
High School (11–12) · Modules and Libraries
Class 12 BoardPCAP (Python Institute)+1APPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
A folder holds main.py, a module util.py, and a subfolder lib with another module, also called util.py. You run main.py from this folder. util.py: lib/util.py: main.py: What does main.py print?
High School (11–12) · Modules and Libraries
Class 12 BoardPCAP (Python Institute)+1APPCAP (Python Institute)
StemPy LabStemPy Lab
Hard
Inside the folder kit there are two files: an __init__.py that sets a version number, and a module conv.py. The program main.py is next to that folder. kit/__init__.py: kit/conv.py: main.py: What does main.py print?
High School (11–12) · Modules and Libraries
Class 12 BoardPCAP (Python Institute)+1APPCAP (Python Institute)
StemPy LabStemPy Lab
Advanced
Page 1 of 13
…

Showing 1–25 of 325