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
  1. Python Programming
  2. /Python Essentials
  3. /Essentials Projects

Essentials Projects

Python Programming · High School (9–10) · 1 course, 13 worked problems, 20 practice questions

A project joins many skills in one longer program. In this topic you plan and build programs that use dictionaries, files, string handling, searching, sorting and error handling together. The projects include a contact book, a program that cracks a secret message and a marks report for a class. Each project starts with a plan of inputs, processes and outputs. It then grows in small steps, with a test after each step. Finishing a project shows how the separate tools of Python fit together to solve a real problem.

With practice you will be able to

  • Plan a longer program as inputs, processes and outputs
  • Combine dictionaries, files and functions in one program
  • Test each part of a project before adding the next

Lessons

  • Three Essentials ProjectsCan you crack a Caesar code without knowing the shift?High School (9–10)

Practice questions

Choose an answer, then check it. Each one shows a full explanation.

contacts = {"ravi": "98765"}. What does contacts.get("Ravi".lower()) give?

A message was coded with a shift of 19. Which shift, from 0 to 25, decodes it with the same function?

ranked = sorted([("Asha", 72), ("Ravi", 85), ("Meera", 64)], key=lambda p: -p[1]). What is ranked[0][0]?

commands = {"hi": greet}, where greet is a function. What does commands["hi"]() do?

Why is a dictionary a good tool for a contact book?

What does contacts.get("zoya") give if there is no Zoya in the book?

In a long English text, which letter is the most common?

The most common letter of a long secret is h. The place of h is 7 and the place of e is 4. What shift does the rule guess?

Which module gives the mean, the median and the standard deviation?

A student writes a bare except: around the whole marks report, so that nothing ever stops it. What is the problem?

All 20 practice questions on Essentials Projects →

Worked problems

Each one has a hint, the key idea and a full worked solution.

  • Write three small functions square(n), double(n) and negate(n), and a dictionary operations that…Medium
  • Choose a project: a program that keeps the scores of a quiz game and shows who is winning…Easy
  • Write a function above_mean(marks) for a dictionary of name and mark…Medium
  • Write add(name, number) for the contact book…Easy
  • The book has asha and ravi. What happens with contacts["zoya"]? …Easy
  • The book is {"meera": "99887", "asha": "98765", "ravi": "91234", "kabir": "90000"}…Medium
  • Count the letters of balloon with a dictionary…Medium
  • In a long English secret, the most common letter is x…Medium
  • The secret is mjqqt. The letter q appears twice, so the rule guesses that q stands for e…Hard
  • Five students have the marks 92, 78, 85, 64, 78…Medium
  • Rank the marks {"Asha": 92, "Ravi": 78, "Meera": 85, "Kabir": 64, "Zoya": 78} from the highest…Medium
  • What does statistics.mean([]) do? Write safe_mean(values) that gives None for an empty list and the…Hard

All 13 worked problems on Essentials Projects →

Python labs

  • Contact book tools
  • Guess the shift
  • Marks report tools
  • Run the commands
  • Project: the command menu
  • Plan and test: a unit converter

Related topics

  • Python Essentials
  • Dictionaries
  • Tuples and Sets
  • Errors and Exceptions
  • Modules and Libraries
  • Searching and Sorting
  • Recursion
  • Text Processing