S SmartDocs
Chuỗi bài: python old python 33 dòng · Cập nhật 2026-02-03

HomeWork.py

python_old/HomeWork.py

# Home work #1
What are the built-in functions in list

# Home work #2
############# Home work ############
Homework 1: Library Book Tracker
Objective: Use dictionary, list, and control flow.

Task:

Create a system to track library books.

Each book has: title, author, genre, and status ("available" or "checked out").

Use a list of dictionaries to represent the library.

Functions to:

Add a new book.

Search for books by genre or author.

Mark a book as checked out or returned.

Print all available books.

Concepts Practiced:

Dictionary structure

if/else to update status

Loops for searching/filtering

Bài viết liên quan