-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstocktest.py
More file actions
16 lines (12 loc) · 765 Bytes
/
stocktest.py
File metadata and controls
16 lines (12 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#testing if stock works
from StockModule import Stock
def main():
symbol= eval(raw_input("Enter in a symbol for the stock company(in quotations):" ))
name= eval(raw_input("Enter in a name for the stock company(in quotations): "))
currentPrice = eval(raw_input("Enter in a value for the current price of the stock(as a float): "))
PreviousClosingPrice= eval(raw_input("Enter in a value for the previous closing price(as a float): "))
stock= Stock(PreviousClosingPrice, currentPrice, name, symbol)
print("The symbol of the stock company is", stock.getSymbol())
print("The name of the stock company is ", stock.getName())
print("The percent change is ", format(stock.getChangePercent(), ".2f"))
main()