Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
Problems
/
Python Basics
Python Basics
Python Programming
+ Upload a Problem
All Levels
Middle Stage (6–8)
High School (9–10)
High School (11–12)
Undergraduate
General
Subtopic
All subtopics
Getting Started with Python
Variables and Data Types
Operators and Expressions
Input and Output
Strings
Conditionals: if, elif, else
Loops
Lists
Functions
Mini Projects
All
Easy
Medium
Hard
Sort
Mixed
Newest first
Oldest first
A to Z
178 problems
Type:
Any
Conceptual
Numerical
Python-Coded
1.
This program should show the average of the even numbers in the list.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Mini Projects
StemPy Lab
Medium
2.
The marks are [72, 85, 64, 90, 58, 91, 60, 74].
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Mini Projects
StemPy Lab
Medium
3.
A quiz has 5 questions but only 4 answers.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Mini Projects
StemPy Lab
Easy
4.
The secret number is 42, the limit is 7 tries, and the player types 50, 30, 36, 42.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Mini Projects
StemPy Lab
Medium
5.
A function ticket_price(age) gives the price of a museum ticket: under 5 is free (0), under 13 pays…
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Functions
StemPy Lab
Medium
6.
Same name, two variables
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Functions
StemPy Lab
Medium
7.
This program should show The total is 50. It stops with an error. Find the fault and fix it.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Functions
StemPy Lab
Medium
8.
Which of these four programs shows something? Say it before you run each one.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Functions
StemPy Lab
Easy
9.
Here is a table of marks: one row for each student, and one column for each test.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Lists
StemPy Lab
Medium
10.
What do a and b show at the end? Say it before you run it.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Lists
StemPy Lab
Medium
11.
The list is marks = [45, 78, 90, 62, 38, 85, 71].
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Lists, Loops
StemPy Lab
Easy
12.
Find the position
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Lists
StemPy Lab
Easy
13.
The list is days = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"].
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Lists
StemPy Lab
Easy
14.
This loop should show the even numbers from 2 up to and including 10.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Medium
15.
Write a program that asks for a password, again and again, until the user types python123.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Medium
16.
Find the first number from 100 upwards that can be divided by both 6 and 8.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Easy
17.
Asha saves 45 rupees every week, and has 0 at the start.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Easy
18.
How many times does the line print("x") run?
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Medium
19.
Print a rectangle of stars with 4 rows and 7 columns.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Easy
20.
This program should show the sum of the numbers 1 to 4, which is 10.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Medium
21.
How many numbers does each row have, and which is the last number?
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Loops
StemPy Lab
Easy
22.
Write a simpler condition, without a not in front of a bracket, that is the same as each of these…
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Conditionals: if, elif, else
StemPy Lab
Medium
23.
At a club door the guard asks the age first.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Conditionals: if, elif, else
StemPy Lab
Medium
24.
This program should say a vowel only for the letters a, e, i, o and u.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Conditionals: if, elif, else
StemPy Lab
Medium
25.
The ticket price rules are: under 5 free, under 13 pays 50, under 60 pays 100, and the rest pay 70.
Middle Stage (6–8), High School (9–10), High School (11–12), Undergraduate, General · Conditionals: if, elif, else
StemPy Lab
Medium
←
Previous
Page 1 of 8
1
2
3
4
5
…
8
Next
→
Showing 1–25 of 178