import json
import webbrowser
customers = []
international_packages = []
domestic_packages = []
bookings = []
def add_customer():
name = input("Enter customer name: ")
contact = input("Enter contact number: ")
email = input("Enter email address: ")
[Link]({'name': name, 'contact': contact, 'email': email})
print("✅ Customer added successfully.")
def view_customers():
if not customers:
print("❌ No customers found.")
return
for c in customers:
print(c)
def add_package(package_type):
name = input("Enter package name: ")
location = input("Enter location: ")
cost = float(input("Enter cost: ₹"))
package = {'name': name, 'location': location, 'cost': cost}
if package_type == "international":
international_packages.append(package)
else:
domestic_packages.append(package)
print(f"✅ {package_type.capitalize()} Package added.")
def view_packages(package_type):
packages = international_packages if package_type == "international" else domestic_packages
if not packages:
print(f"❌ No {package_type} packages.")
return
for p in packages:
print(p)
def open_google_map():
location = input("Enter the place/location: ")
[Link](f"[Link] ', '+')}")
print("🌍 Opening Google Maps...")
def book_tour():
customer_name = input("Customer name: ")
tour_type = input("Tour type (international/domestic): ").lower()
view_packages(tour_type)
package_name = input("Enter package name to book: ")
for package in (international_packages if tour_type == "international" else domestic_packages):
if package['name'].lower() == package_name.lower():
[Link]({'customer': customer_name, 'package': package})
print("✅ Booking confirmed.")
return
print("❌ Package not found.")
def generate_receipt():
for booking in bookings:
print(f"\n📄 Receipt for {booking['customer']}")
print(f"Package: {booking['package']['name']}")
print(f"Location: {booking['package']['location']}")
print(f"Amount Paid: ₹{booking['package']['cost']}")
print("-" * 40)
def exit_system():
code = input("Enter exit code to close the system: ")
if code == "1234":
print("🔒 Exiting system. Goodbye!")
exit()
else:
print("❌ Invalid code.")
def main():
while True:
print("\n==== Travel Agency Management ====")
print("1. Add Customer")
print("2. View Customers")
print("3. Add International Package")
print("4. Add Domestic Package")
print("5. View International Packages")
print("6. View Domestic Packages")
print("7. Navigate using Google Map")
print("8. Book a Tour")
print("9. Generate Receipts")
print("10. Exit System")
choice = input("Enter your choice: ")
if choice == "1":
add_customer()
elif choice == "2":
view_customers()
elif choice == "3":
add_package("international")
elif choice == "4":
add_package("domestic")
elif choice == "5":
view_packages("international")
elif choice == "6":
view_packages("domestic")
elif choice == "7":
open_google_map()
elif choice == "8":
book_tour()
elif choice == "9":
generate_receipt()
elif choice == "10":
exit_system()
else:
print("❌ Invalid choice. Please try again.")
if __name__ == "__main__":
main()