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 Essentials
/
Tuples and Sets
Tuples and Sets
Python Programming
+ Upload a Problem
More in Python Essentials
Dictionaries
Tuples and Sets
Errors and Exceptions
Modules and Libraries
Searching and Sorting
Recursion
Text Processing
Essentials Projects
All Levels
High School (9–10)
High School (11–12)
Undergraduate
General
All
Easy
Medium
Sort
Mixed
Newest first
Oldest first
A to Z
13 problems
Type:
Any
Conceptual
Numerical
Python-Coded
1.
Write a program that swaps the values of two variables a and b in one line, without a third…
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Easy
2.
Choose a list, a tuple, a set or a dictionary for each, and give a reason in one sentence.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Easy
3.
Three clubs have these members. Find the students who are in exactly two clubs.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
4.
How many letters does mississippi have, and how many different letters?
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
5.
How many different students are there in the two clubs together, and who are they?
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Easy
6.
With the same two clubs, who is in cricket only, and who is in chess only?
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
7.
Cricket club: Asha, Ravi, Meera. Chess club: Ravi, Kabir, Meera. Who is in both clubs?
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
8.
Use the set {"a", "e", "i", "o", "u"} to test the letters e, x, a and z.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Easy
9.
The sentence is to be or not to be. How many words does it have, and how many different words?
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
10.
How many different numbers are there in [3, 1, 3, 2, 1]? Show them in order.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Easy
11.
point = (3, 4). A student writes point[0] = 10 and the program stops.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
12.
Write a function min_max(numbers) that returns the smallest and the biggest number.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Medium
13.
For point = (3, 4), find point[0], len(point) and the sum of the two numbers by unpacking.
High School (9–10), High School (11–12), Undergraduate, General · Tuples and Sets
StemPy Lab
Easy