Update main.py

This commit is contained in:
2025-12-08 11:41:29 -05:00
parent 4d5d11d34b
commit 9b85d79e67

10
main.py
View File

@@ -18,7 +18,7 @@ def printMenu(Balance, menu):
elif menu == "index": elif menu == "index":
print("The index as of day " + str(day) + " is " + str(indexPrice)) print("The index as of day " + str(day) + " is " + str(indexPrice))
elif menu == "daysleft": elif menu == "daysleft":
print("as of today you have " + str(daysleft) + ". have fun!") print("as of today you have " + str(daysleft) + " days left. have fun!")
""" """
def newday(): def newday():
kwiktripStockPrice = kwiktripStockPrice + random.randint(-100.99, 100.99) kwiktripStockPrice = kwiktripStockPrice + random.randint(-100.99, 100.99)
@@ -123,6 +123,14 @@ while daysleft > -1:
walmartStockPrice = abs(walmartStockPrice + random.randint(-100, 100)) walmartStockPrice = abs(walmartStockPrice + random.randint(-100, 100))
carStockPrice = abs(carStockPrice + random.randint(-100, 100)) carStockPrice = abs(carStockPrice + random.randint(-100, 100))
marketCrash = random.randint(0, 1000)
if marketCrash == 555:
kwiktripStockPrice = -200
appleStockPrice = -200
microsoftStockPrice = -200
walmartStockPrice = -200
carStockPrice = -200
print("the market has crashed every stock is now -200 in value")
stockcost = [kwiktripStockPrice, appleStockPrice, microsoftStockPrice, walmartStockPrice, carStockPrice] stockcost = [kwiktripStockPrice, appleStockPrice, microsoftStockPrice, walmartStockPrice, carStockPrice]