================================================================================
  Question 21: Try-Except-Else-Finally Flow Demonstration
================================================================================

FULL QUESTION:
Write a program where:
- The user is asked to enter an amount to withdraw from an ATM account.
- Initial balance is Rs. 10,000.
- Use a try block to check for invalid inputs (non-numeric strings, negative amounts,
  zero, or amounts exceeding account balance).
- Use except block to catch and handle the errors.
- Use else block to execute only if the withdrawal was successful (deduct amount
  and display the updated balance).
- Use finally block to always print a closing message.

SHORT QUESTION:
Comprehensive error handling demonstration implementing try-except-else-finally control flow for ATM withdrawals.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 21: Try-Except-Else-Finally Flow Demonstration

- Prerequisites: Python 3.x (Standard library only).
- Setup: None.
- How to Run: python question_21.py
- Expected Behavior: Prompts user for a withdrawal amount and demonstrates try, except, else, and finally execution blocks.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_21.py
--------------------------------------------------------------------------------
balance = 10000

try:
    amount = int(input("Enter the amount to be withdrawn: "))

    if amount < 0:
        raise ValueError("Amount cannot be negative.")
    if amount > balance:
        raise ValueError("Insufficient balance.")

except ValueError as e:
    print(f"Transaction Failed: {e}")

else:
    balance -= amount
    print("Transaction Successful!")

finally:
    print(f"Balance: {balance}")
--------------------------------------------------------------------------------
