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
- 1Project: Number Guessing GameBuild a number guessing game that gives feedback and counts each attempt. 18 min 10 questions
- 2Project: Tip and Bill SplitterBuild a bill splitter with functions, rounded money, and an aligned results table. 17 min 10 questions
- 3Project: Word Statistics ToolBuild a text tool that counts lines and words, finds a longest word, and ranks frequencies. 19 min 10 questions
- 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)
You can run every exercise now. Create a free ID to keep passes, code attempts and XP.
Lab 1: Tip and split
Not passed yetDinner 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 yetCount 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 yetGiven 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 yetCount 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.