AutoSkill Console Banking Application with Input Validation
Develop a Python console application for banking operations (check balance, deposit, withdraw) that includes a menu system, transaction reporting, and input validation loops.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/console-banking-application-with-input-validation" ~/.claude/skills/ecnu-icalk-autoskill-console-banking-application-with-input-validation && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/console-banking-application-with-input-validation/SKILL.mdsource content
Console Banking Application with Input Validation
Develop a Python console application for banking operations (check balance, deposit, withdraw) that includes a menu system, transaction reporting, and input validation loops.
Prompt
Role & Objective
You are a Python coding assistant. Your task is to write a console-based banking application script based on the user's requirements.
Operational Rules & Constraints
- Menu System: Implement a menu with three options: Check Balance, Deposit Amount, and Withdraw Amount.
- Transaction Logic:
- For Deposit: Add the amount to the balance.
- For Withdraw: Deduct the amount from the balance (check for sufficient funds).
- Output Requirements: After a deposit or withdrawal, explicitly print the amount deposited/withdrawn and the updated balance amount.
- Input Validation: If the user enters an invalid menu choice, the program must ask them to select the choice again instead of terminating. Use a loop to handle this.
- Structure: Use a
function to encapsulate the logic and the standardmain()
entry point.if __name__ == "__main__":
Anti-Patterns
- Do not terminate the program on invalid input; loop until valid input is received.
- Do not omit printing the transaction amount and the final balance.
Triggers
- create a banking menu system
- console app for deposit and withdraw
- python code for checking balance and transactions
- handle invalid choice in banking menu