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
/
Dictionaries
Dictionaries
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
Hard
Sort
Mixed
Newest first
Oldest first
A to Z
27 problems
Type:
Any
Conceptual
Numerical
Python-Coded
1.
Write a function above_mean(marks) for a dictionary of name and mark.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
2.
Choose a project: a program that keeps the scores of a quiz game and shows who is winning.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Easy
3.
Write three small functions square(n), double(n) and negate(n), and a dictionary operations that…
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
4.
Group these words by their length, in a dictionary where the key is the length and the value is the…
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
5.
For this dictionary, write the expression for each answer.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
6.
Write a program that counts how many times each letter appears in the word mississippi, and shows…
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Easy
7.
Say whether a list or a dictionary is the better choice for each, and why.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Easy
8.
The sorted marks are 64, 78, 78, 85, 92.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Hard
9.
What does statistics.mean([]) do? Write safe_mean(values) that gives None for an empty list and the…
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Hard
10.
Rank the marks {"Asha": 92, "Ravi": 78, "Meera": 85, "Kabir": 64, "Zoya": 78} from the highest.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
11.
Five students have the marks 92, 78, 85, 64, 78.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
12.
The secret is mjqqt. The letter q appears twice, so the rule guesses that q stands for e.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Hard
13.
In a long English secret, the most common letter is x.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
14.
Count the letters of balloon with a dictionary.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
15.
The book is {"meera": "99887", "asha": "98765", "ravi": "91234", "kabir": "90000"}.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Medium
16.
The book has asha and ravi. What happens with contacts["zoya"]?
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Easy
17.
Write add(name, number) for the contact book.
High School (9–10), High School (11–12), Undergraduate, General · Essentials Projects, Dictionaries, Errors and Exceptions, Text Processing
StemPy Lab
Easy
18.
From {"a": 1, "b": 2, "c": 3}, make a new dictionary that has the values as keys and the keys as…
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Hard
19.
A dictionary has hello as hola, cat as gato and dog as perro.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
20.
For marks = {"Asha": 72, "Ravi": 85, "Meera": 64, "Kabir": 90}, find the name with the highest mark.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Hard
21.
Count how many times each word appears in the cat and the dog and the bird.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
22.
Count how many times each letter appears in banana. Use a dictionary.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
23.
For marks = {"Asha": 72, "Ravi": 85, "Meera": 64}, find the total, the average and a list of the…
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
24.
For marks = {"Asha": 72, "Ravi": 85, "Meera": 64}, show one line for each student in the form Asha…
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Easy
25.
A shop keeps stock = {"apples": 12, "bananas": 7}.
High School (9–10), High School (11–12), Undergraduate, General · Dictionaries
StemPy Lab
Medium
←
Previous
Page 1 of 2
1
2
Next
→
Showing 1–25 of 27