basic-programming-learning-phase-1

Exercises

Practice problems ordered by difficulty. Try each before peeking at solutions/.

Easy

  1. Hello, name — Ask for a name, print Hello, <name>!
  2. Max of three — Write max3(a, b, c) returning the largest.
  3. Reverse a string — Return "ollew" for "hello" (no [::-1]).

Medium

  1. Word count — Given a sentence, return a dict of word → count.
  2. Unique items — Return a list of a list’s items with duplicates removed, preserving order.
  3. Temperature table — Print Celsius 0–100 step 10 with Fahrenheit column.

Hard

  1. Caesar cipher — caesar(text, shift) encrypts letters only; wraps at z.
  2. Matrix transpose — transpose([[1,2],[3,4]]) → [[1,3],[2,4]].
  3. Simple bank — A dict-backed account with deposit, withdraw, balance; withdraw refuses overdrafts.

Write your attempts in this folder; reference solutions live in solutions/ — see easy_solutions.py.