[Tutor] (no subject)

Dragonfirebane at aol.com Dragonfirebane at aol.com
Tue Jun 1 21:46:25 EDT 2004


Skipped content of type multipart/alternative-------------- next part --------------
1.	Allow creation of accounts with unique id's (based on birthday [ddmmyyyy] times pi times 1000 times 'time.time()' % 100000000)	CHECK
2.	Allow these accounts to be manipulated (deposits, withdrawals, transfers to existing accounts, and transfers to new accounts)
3.	Allow account info (including account id, balance, date of opening, date of last use, a log of transactions, time since opening, and time since last use (but NOT the password)) to be saved.
4.	Allow retrieval of this saved information only when the CORRECT password for the account id is entered.
5.	Allow a directory of stored account id's to be visible without a password (but NOT their balances).
6.	Allow compound interest to take effect compounded quarterly at 3 percent.
7.	Allow the bank to charge a .5% commission on all transactions.
8.	*optional* Allow the bank to hold a certain amount of money (expressly from aforementioned fees) to be used in loans at 25% interest compounded semi-annually, with payments to be made once a month.
9.	Allow each user to be assigned a certain amount of money to begin with, based on the number of vowels in their name times  'time.time()' to the power of pi split into at most 6 digits. IN PROGRESS
-------------- next part --------------
def newuser():
    new = raw_input("Are you a new user [y/n]? ")
    while new not in 'yYnN':
        new = raw_input("""
        Please enter 'y' for yes or 'n' for no.
        Are you a new user? """)
    if new in 'yY':
        startmon = raw_input("Please enter your first and last name [------ ------]. ")
        vowsearch = re.compile('[aeiou]*', re.IGNORECASE)
        print re.search(vowsearch, startmon).group()
def newacc():
    newac = raw_input("Would you like to create a new account [y/n]? ")
    while newac not in 'yYnN':
        newac = raw_input("""
        Please enter 'y' for yes or 'n' for no.
        Would you like to create a new acount? """)
    if newac in 'yY':
        newacid = int(raw_input("Please enter your birthday [ddmmyyyy]. "))
        newacid = 3141.5962 * newacid
        newacid = newacid * time.time()
        newacid = newacid % 100000000
        initbal = int(raw_input("How much money would you like to put in your account? "))
        print "Account number %d created with $%d in it." % (newacid, initbal)      
        return newacid
import time
import re
newuser()
newacc()


More information about the Tutor mailing list