-
Course Orientation
-
Python Fundamentals
-
Database Query (SQL & PostgreSQL)
-
FastAPI + Odoo Integration
-
Odoo Architecture & Dev Environment Setup
-
Creating Your First Custom Module
-
Models & Fields — The Odoo ORM
-
Computed Fields, Constraints & Onchange
-
ORM Methods & Recordset Operations
-
Form & List Views — XML Architecture
-
Search Views, Filters & Group By
-
View Inheritance & Module Extension
-
Business Methods, Workflows & Status Bars
-
Wizards (TransientModel)
-
Security — Groups, Access Rights & Record Rules
-
QWeb Reports — PDF & Print Layouts
-
Scheduled Actions & Automated Rules
-
External API & JSON-RPC Deep Dive
-
On-Prem & Cloud Deployment
-
Capstone — Full Custom Module Build
Problem-Solving Lab — 10 Python Exercises
Ten exercises that combine everything from this section. Try each for 10 minutes before reading the hint.
Exercises
- FizzBuzz: print 1–100; multiples of 3 → "Fizz", of 5 → "Buzz", of both → "FizzBuzz". Hint: check the combined condition first, or use a list of parts and
"".join. - Palindrome checker: return True if a string reads the same ignoring case, spaces and punctuation. Hint: filter with
str.isalnum, then compares == s[::-1]. - Word counter: read a text and return the 5 most frequent words with counts. Hint:
dict.get(word, 0) + 1, thensorted(items, key=lambda kv: kv[1], reverse=True)orcollections.Counter. - Fibonacci: return the first N Fibonacci numbers, both as a list and as a generator. Hint: iterate with two variables
a, b = b, a + b;yieldfor the generator. - Duplicate remover: given a list, return it deduplicated while preserving order. Hint:
list(dict.fromkeys(items)), or a set for seen membership in a loop. - CSV reader summary: read
sales.csv(date, product, amount) and print total and average amount per product. Hint:csv.DictReader+ a dict of lists, or running totals withfloat(row["amount"]). - Prime numbers: list all primes below N using a simple sieve. Hint: start from a list of True flags, cross out multiples of each prime up to √N.
- Password strength validator: score a password 0–4 for length ≥ 8, upper+lower, digit, symbol. Hint: sum boolean checks; use
any(c.isupper() for c in pw). - Contact book: dict-backed add/search/delete/list commands in a loop, persisted to JSON on exit. Hint:
while True+input()dispatch,json.dumpin afinally. - Number guessing game: the program picks 1–100 and answers "higher/lower" until guessed; count attempts. Hint:
random.randint,int(input())wrapped in try/except for non-numeric input.
Deliverable
One lab01.py (or a lab01/ package) where each exercise is a function with a docstring, plus a small demo block that runs all ten.
Level: Beginner | Duration: ~1h. Ten small real exercises — from FizzBuzz to a CSV summarizer — each with a solution hint to unblock you.
Rating
0
0
There are no comments for now.