Skip to contentSkip to navigation

Module 6 of 6, Python Foundations

Foundations Projects

Build three small programs end to end with everything from this course.

module checksSign in to track

  • Lessons complete-, not done
  • Lesson quizzes taken-, not done
  • Module Labs passed-, not done
  • Module exam passed at 80%-, not done
lessons
3
quiz questions
36
reading time
24 min
exam length
15 Q
coding exercises
5

Lessons

  1. Project: Number Guessing GameBuild a number guessing game step by step: pick a secret with random, loop until the player wins or runs out of attempts, give higher or lower hints, and check the input. 8 min 12 questions
  2. Project: Tip & Bill SplitterBuild a tip and bill splitter: read the bill, tip rate and number of people, work out the tip, total and fair shares in whole cents, and print a tidy receipt. 8 min 12 questions
  3. Project: To-Do Task ManagerBuild a to-do list manager from lists, dictionaries and functions: add tasks, mark them done, remove them, show them numbered and count what is left. 8 min 12 questions

Lab: write it yourself

Real Python, real checks: write your answer, press Run checks, and keep going until it passes. (2 exercises)

All module exercises

The Lab needs an account. Sign in or create a free ID to run these exercises.

Lab 1: Tip and split

Sign-in required

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

Sign in to practise

Sign in to access the interactive Python editor, write and run code checks against automated tests, use hints, and save your practice. Practice does not award XP.

Lab 2: Pending tasks

Sign-in required

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

Sign in to practise

Sign in to access the interactive Python editor, write and run code checks against automated tests, use hints, and save your practice. Practice does not award XP.

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.)