balance = 1000.0
def display_menu(): print("\nWelcome to the ATM Simulator") print("Please choose an option:") print("1. Check Balance") print("2. Deposit Money") print("3. Withdraw Money") print("4. Exit")
def check_balance(): print(f"\nYour current balance is: ${balance:.2f}")
def deposit_money():
global balance
amount = float(input("\nEnter the amount to deposit:
def withdraw_money():
global balance
amount = float(input("\nEnter the amount to withdraw:
def main(): while True: display_menu() choice = input("\nEnter your choice: ")
if choice == '1':
check_balance()
elif choice == '2':
deposit_money()
elif choice == '3':
withdraw_money()
elif choice == '4':
print("\nThank you for using the ATM. Goodbye!")
break
else:
print("\nInvalid choice. Please select a valid option.")
if name == "main": main()