VintageRice

[College] - Bank Account

Apr 21st, 2015
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. #   -*- coding: cp1252 -*-
  2. #   Date Created: 21/04/2015
  3. #   Author: Kyle Minto
  4. #   Barclays Bank
  5.  
  6. print("************************");
  7. print("Welcome to Barclays Bank");
  8. print("************************\n");
  9.  
  10. def runBank():
  11.    
  12.     balance = 100;
  13.  
  14.     print("Your balance is £" + str(balance));
  15.  
  16.     required = input("Enter amount required: ");
  17.  
  18.     if(required > balance):
  19.         print("\nSorry, you have insufficient funds");
  20.         another = raw_input("Would you like another amount?");
  21.  
  22.         if(another == "yes" or another == "Yes"):
  23.             print("\n");
  24.             runBank();
  25.     else:
  26.         print("Your balance is now £" + str(balance - required));
  27.  
  28. runBank();
Add Comment
Please, Sign In to add comment