Loading...
Vietnam Geography App
Loading...
Vietnam Geography App
Quản lý dữ liệu như một chuyên gia! Bạn sẽ học cách lưu trữ, sắp xếp và thao tác với danh sách, tuple để xây dựng ứng dụng thực tế, từ quản lý công việc đến xử lý dữ liệu lớn.
Quản lý danh sách công việc với lists
tasks = []
completed = []
def show_menu():
print("\n=== TASK MANAGER ===")
print("1. Thêm task")
print("2. Hiển thị tasks")
print("3. Hoàn thành task")
print("4. Xóa task")
print("5. Tasks đã hoàn thành")
print("0. Thoát")
def add_task():
task = input("Mô tả task: ")
priority = input("Mức độ ưu tiên (cao/trung/thấp): ").lower()
tasks.append((task, priority))
print("Đã thêm task!")
def show_tasks():
if not tasks:
print("Không có task nào!")
return
print("\n=== DANH SÁCH TASKS ===")
for i, (task, priority) in enumerate(tasks, 1):
print(f"{i}. {task} ({priority})")
def complete_task():
show_tasks()
if not tasks:
return
try:
index = int(input("Số thứ tự task hoàn thành: ")) - 1
if 0 <= index < len(tasks):
completed_task = tasks.pop(index)
completed.append(completed_task)
print("Task đã hoàn thành!")
else:
print("Số thứ tự không hợp lệ!")
except ValueError:
print("Vui lòng nhập số!")
while True:
show_menu()
choice = input("Chọn: ")
if choice == "0":
break
elif choice == "1":
add_task()
elif choice == "2":
show_tasks()
elif choice == "3":
complete_task()
Data storage và manipulation
Shopping cart implementation
User management systems
Inventory tracking
Menu systems
Data processing workflows