Posts

Bus Ticket Booking System in Python

Image
PROGRAM: bus_no = "10" source = "udumalpet" destination = "chennai" total_seats = 10 available_seats = 10 bookings = [] while True:     print("\nMenu")     print("1. Bus Info")     print("2. Book Ticket")     print("3. Show Bookings")     print("4. Exit")     choice = input("Enter your choice: ")     if choice == '1':           print("Bus No:", bus_no)         print("Source:", source)         print("Destination:", destination)         print("Total Seats:", total_seats)         print("Available Seats:", available_seats)     elif choice == '2':         if available_seats > 0:             name = input("Enter your name: ")             seat_number = total_seats - available_seats + 1            ...

ATM Transaction System in Python

Image
PROGRAM:  balance = 1000 def check_balance():     print("The balance amount is ",balance) def withdrawal():     global balance     amt = int(input("Enter your withdrawal amount: "))     if amt > balance:         print("Insufficient funds")     else:         balance -= amt         print("Amount withdrawn successfully!") def deposit():     global balance     amount = int(input("Enter an amount to deposit: "))     if amount > 0:         balance += amount         print("Amount deposited successfully!")     else:         print("Enter a valid amount.") def atm():     a=input("insert your card:")     pin_code = int(input("Enter your PIN code: "))     if pin_code == 1234:             b=input("current account or savings...