β’
μΆλ°μ§: λΆκ²½λ λμ°μΊ μ λ¬Έ
β’
λμ°©μ§: λΆμ°μ μ
β’
μΈμ: 3μΈ
β’
μκ° λ° μ₯μ: μ€ν 6μ, λ―Έλκ΄ νΈμμ μ
taxi_board = [] # κ²μκΈ μ μ₯μ
def show_menu():
print("\nπ κ°μ΄ νμ νμ€ λΆ κ΅¬νκΈ°")
print("1. μ λͺ¨μ§ κΈ μμ±")
print("2. κ²μλ κΈ λ³΄κΈ°")
print("3. μ’
λ£")
def create_post():
from_location = input("μΆλ°μ§: ")
to_location = input("λμ°©μ§: ")
people = input("μΈμ μ: ")
time_place = input("μΆλ° μκ° λ° μ₯μ: ")
post = {
"μΆλ°μ§": from_location,
"λμ°©μ§": to_location,
"μΈμ": people,
"μκ°/μ₯μ": time_place
}
taxi_board.append(post)
print("β
κΈμ΄ λ±λ‘λμμ΅λλ€!")
def view_posts():
print("\nπ κ²μλ νμ μ 보")
if not taxi_board:
print("μμ§ λ±λ‘λ κΈμ΄ μμ΅λλ€.")
else:
for i, post in enumerate(taxi_board, 1):
print(f"\nκΈ #{i}")
for key, value in post.items():
print(f"{key}: {value}")
# λ©μΈ 루ν
while True:
show_menu()
choice = input("μ ν (1~3): ")
if choice == "1":
create_post()
elif choice == "2":
view_posts()
elif choice == "3":
print("νλ‘κ·Έλ¨μ μ’
λ£ν©λλ€.")
break
else:
print("μλͺ»λ μ
λ ₯μ
λλ€. λ€μ μ νν΄μ£ΌμΈμ.")