How to use the drama.dramaticTyping function in drama

To help you get started, we’ve selected a few drama examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def quitMenu():
    dramaticTyping("Do you want to try again? Y/N ")
    answer = raw_input("").upper()
    if answer == 'Y':
        main()
    else:
        exit()
github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def inputBuy():
    dramaticTyping("Select the crypto curreny you want to buy? \n")
    curreny = raw_input("").upper()
    dramaticTyping("That's great. How much quantity you want to buy? \n")
    quantity = float(raw_input(""))
    return curreny, quantity
github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def welcome():
    print("\n")
    dramaticTyping("Simple Crypto Trading Simulator \n")
    dramaticTyping("Hey Yo, you are back in time. It's Wednesday, March 7, 2018 7:39 AM \n")
    dramaticTyping("Here are the crypto currencies you can invest. \n")
    dramaticTyping("Fetching prices ... \n")
github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def welcome():
    print("\n")
    dramaticTyping("Simple Crypto Trading Simulator \n")
    dramaticTyping("Hey Yo, you are back in time. It's Wednesday, March 7, 2018 7:39 AM \n")
    dramaticTyping("Here are the crypto currencies you can invest. \n")
    dramaticTyping("Fetching prices ... \n")
github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def welcome():
    print("\n")
    dramaticTyping("Simple Crypto Trading Simulator \n")
    dramaticTyping("Hey Yo, you are back in time. It's Wednesday, March 7, 2018 7:39 AM \n")
    dramaticTyping("Here are the crypto currencies you can invest. \n")
    dramaticTyping("Fetching prices ... \n")
github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def inputBuy():
    dramaticTyping("Select the crypto curreny you want to buy? \n")
    curreny = raw_input("").upper()
    dramaticTyping("That's great. How much quantity you want to buy? \n")
    quantity = float(raw_input(""))
    return curreny, quantity
github jamesfebin / CryptoTradingSimulator / run.py View on Github external
def main():
    welcome()
    coins = fetchCoins()
    currency, quantity = inputBuy()
    try:
        price = coins[currency]['price']
    except Exception as e:
        dramaticTyping("Invalid currency entered, please try again \n")
        inputBuy()
    runSimulation(coins[currency]['price'], quantity, currency)
    quitMenu()
github jamesfebin / CryptoTradingSimulator / simulator.py View on Github external
def runSimulation(boughtPrice, quantity, currency):
    valueThen = boughtPrice * quantity
    bestPrice, timestamp = fetchBestBidPriceFromDB(currency)
    bestValue = bestPrice * quantity
    priceDifference = (bestValue - valueThen)/float(valueThen) * 100
    time = datetime.datetime.fromtimestamp(timestamp).strftime('%A, %B %-d, %Y %I:%M %p')
    print("The best bid price for {} was ${} at {} \n".format(currency, bestPrice, time))
    if priceDifference>0:
        dramaticTyping("Your total asset value is ${}, it has increase by {}% \n".format(round(bestValue, 4), round(priceDifference,2)))
    else:
        dramaticTyping("Your total asset value is ${}, it has decreased by {} \n".format(round(bestValue, 4), round(priceDifference,2)))

drama

Delft Radar Modelling and perfornance Analysis (DRaMA)

GPL-3.0
Latest version published 12 months ago

Package Health Score

50 / 100
Full package analysis

Similar packages