LLD - Design — Parking Lot System
Consider this simplified payment processing pseudocode:
What will be the output of
def process_payment(amount, card_info):
if not validate_card(card_info):
return "Invalid card"
if amount <= 0:
return "Invalid amount"
if not charge_card(card_info, amount):
return "Charge failed"
record_transaction(card_info, amount)
return "Payment successful"
What will be the output of
process_payment(100, 'expired_card') if validate_card returns False for expired cards?