Skip to content

Module 6

>Practice Projects

Build four small programs end to end, one step at a time.

// Lessons

4

// Quiz questions

40

// Reading time

74 min

// Exam length

15 Q

// Coding exercises

8

  1. 1Project: Number Guessing GameBuild a number guessing game that gives feedback and counts each attempt. 18 min 10 questions
  2. 2Project: Tip and Bill SplitterBuild a bill splitter with functions, rounded money, and an aligned results table. 17 min 10 questions
  3. 3Project: Word Statistics ToolBuild a text tool that counts lines and words, finds a longest word, and ranks frequencies. 19 min 10 questions
  4. 4Project: To-Do List ManagerBuild a small task manager with classes that add, complete, remove, and report tasks. 20 min 10 questions

Coding practice: write it yourself

Real Python, real checks: write your answer, press Run checks, and keep going until it passes. (0/4 passed this visit)

All module exercises

You can run every exercise now. Create a free ID to keep passes, code attempts and XP.

Lab 1: Tip and split

Not passed yet

Dinner is 2400 taka with a 10% service charge, shared by 4 people. Print each person's share rounded to 2 decimals.

bill = 2400
service_pct = 10
people = 4
# compute total, then per-head share

Lab 2: Word counter

Not passed yet

Count the words in "practice makes perfect every day".

text = "practice makes perfect every day"
# print the number of words

Lab 3: Pending tasks

Not passed yet

Given the tasks list below, print how many are NOT done.

tasks = [
    {"title": "Homework", "done": True},
    {"title": "Buy eggs", "done": False},
    {"title": "Call aunt", "done": False},
]
# print the pending count

Lab 4: Vowel census

Not passed yet

Count the vowels (a, e, i, o, u) in "learning python".

text = "learning python"
# print the vowel count

References & Further Reading

Related entries from PyLabs's own reference library.

  • input() (Read a line of text typed by a user.)
  • get() (Look up a value safely without raising a KeyError if missing.)
  • copy() (Make a shallow copy of a list.)