Example #1
0
def initiateBuyingSequenceSCOTTY():
    userInfo = juser.getUserData()
    username = str(userInfo['name'])
    totalBook = float(userInfo['book'])
    cash = int(userInfo['cash'])
    if (cash == 0):
        notEnoughCash(cash)
    else:
        hasEnoughCash(cash)
Example #2
0
def initiateBuyingSequenceSCOTTY():
	userInfo = juser.getUserData()
	username = str(userInfo['name'])
	totalBook = float(userInfo['book'])
	cash = int(userInfo['cash'])
	if(cash == 0):
		notEnoughCash(cash)
	else:
		hasEnoughCash(cash)
def showPortfolioPlease():
	if(len(data) != 0):
		userInfo = juser.getUserData()
		username = str(userInfo['name'])
		totalBook = float(userInfo['book'])
		cash = float(userInfo['cash'])
		totalMarket = getObjectFromData() + cash
		helperMethods.printInitial(totalBook,totalMarket,helperMethods.percentGain(totalBook,totalMarket))
		printAllTheStocks(data,totalBook,totalMarket)
	else:
		print "You have no stocks in your portfolio, please buy some stocks"
def showPortfolioPlease():
    if (len(data) != 0):
        userInfo = juser.getUserData()
        username = str(userInfo['name'])
        totalBook = float(userInfo['book'])
        cash = float(userInfo['cash'])
        totalMarket = getObjectFromData() + cash
        helperMethods.printInitial(
            totalBook, totalMarket,
            helperMethods.percentGain(totalBook, totalMarket))
        printAllTheStocks(data, totalBook, totalMarket)
    else:
        print "You have no stocks in your portfolio, please buy some stocks"