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 Basics
  3. /Mini Projects

Mini Projects

Python Programming · Middle Stage (6–8) · 1 course, 14 worked problems, 20 practice questions

A mini project brings the basic skills together in one small, complete program. Examples are a number guessing game, a quiz that keeps a score and a grade book for a class. Each project uses variables, input and output, conditionals, loops, lists and functions together. You start by writing down what the program should do. Then you build it in small steps and test it after each step. When it works, you improve it, for example by checking what the user types or by adding a menu. Fixing your own bugs is part of every project.

With practice you will be able to

  • Plan a program as inputs, steps and outputs before coding
  • Build a small game or tool from loops, lists and functions
  • Test a program after each step and fix the bugs you find

Lessons

  • Three Mini ProjectsShould a quiz accept PaRiS for paris? How do you find the fault in your own program?Middle Stage (6–8)

Practice questions

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

score_for(tries) returns max(0, 100 - 10 * (tries - 1)). What is score_for(5)?

The grade book gives A from 90, B from 75, C from 60 and D below that. How many of the marks 91, 48, 77, 60, 66 get a C?

A quiz has 8 questions and a student gets 7 right. What does print(round(7 / 8 * 100)) show?

A program should add 1 to 10, but its loop is for i in range(1, 10). It runs without an error and shows 45. What is the mistake?

Which numbers can random.randint(1, 6) give?

A student scores 3 out of 4 in a quiz. What is the percentage?

What does reply.lower().strip() make of " PaRiS "?

In a quiz, why must the lists questions and answers be in the same order?

A student adds a question to questions but forgets to add its answer. What happens when the quiz reaches it?

Which loop condition stops the guessing game after at most 7 guesses?

All 20 practice questions on Mini Projects →

Worked problems

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

  • The secret number is 42, the limit is 7 tries, and the player types 50, 30, 36, 42…Medium
  • A quiz has 5 questions but only 4 answers…Easy
  • The marks are [72, 85, 64, 90, 58, 91, 60, 74]…Medium
  • This program should show the average of the even numbers in the list…Medium
  • The secret number is 42. The game gives at most 5 guesses…Medium
  • The score is 100 for one guess, with 10 less for each extra guess, and never below 0…Medium
  • A quiz has two questions and two answers…Easy
  • A student scores 3 out of 4 in the quiz…Medium
  • The correct answer is paris, but the player types PaRiS with spaces and capital letters…Easy
  • Names are ["Asha", "Ravi", "Meera", "Kabir", "Ana"] and marks are [72, 85, 64, 90, 58]…Medium
  • Write a function average(numbers) that returns the average of a list…Easy
  • A mark of 60 or more is a pass. Show the names of the students who passed, with their marks…Medium

All 14 worked problems on Mini Projects →

Python labs

  • Test the judge function
  • Quiz marker
  • Grade book report
  • Fix the program
  • Play the guessing game
  • Make your own quiz

Related topics

  • Python Basics
  • Getting Started with Python
  • Variables and Data Types
  • Operators and Expressions
  • Input and Output
  • Strings
  • Conditionals: if, elif, else
  • Loops
  • Lists
  • Functions