SimulatedTrading.py
def simulated_trading_main(self):
        """Prompt user to select actions in the submenu.""" 
        simulated_trading = SimulatedTrading()
        # check if need to initialize the trading account
        file_exist = simulated_trading.check_file_exist()
        if not file_exist:
            simulated_trading.setup_account()

        while True:
            # prompt user to select actions in the submenu
            select_str = input("Here is the Simulated Trading Menu: \n"
                               "1 - Start Simulated Trading \n"
                               "2 - View Trading History\n"
                               "3 - Exit Simulate Trading \n"
                               "Please enter number 1-3 to select actions: ")
            # start validate input
            try:
                select_int = int(select_str)
            except ValueError:
                print("Error: You must enter an 1-digit integer.")
                continue

            if not 1 <= select_int <= 3:
                print("Error: You must enter the number between 0 and 3(inclusive).")
                continue
            
            # 1 - Start Simulate Trading
            if select_int == 1:
                print("\nYou select: 1 - Start Simulated Trading \n")
                simulated_trading.simulated_trading()
            # 2 - View Trading History   
            elif select_int == 2:
                print("\nYou select: 2 - View Trading History \n")
                simulated_trading.view_historical_trading()
            # 3 - Exit   
            else:
                print("\nYou select: 3 - Exit Simulated Trading")
                break
Prompt user to select actions in the submenu.
Prompt user to select actions in the submenu.
Prompt user to select actions in the submenu .
def simulated_trading_main(self):
        simulated_trading = SimulatedTrading()
        file_exist = simulated_trading.check_file_exist()
        if not file_exist:
            simulated_trading.setup_account()
        while True:
            select_str = input("Here is the Simulated Trading Menu: \n"
                               "1 - Start Simulated Trading \n"
                               "2 - View Trading History\n"
                               "3 - Exit Simulate Trading \n"
                               "Please enter number 1-3 to select actions: ")
            try:
                select_int = int(select_str)
            except ValueError:
                print("Error: You must enter an 1-digit integer.")
                continue
            if not 1 <= select_int <= 3:
                print("Error: You must enter the number between 0 and 3(inclusive).")
                continue
            if select_int == 1:
                print("\nYou select: 1 - Start Simulated Trading \n")
                simulated_trading.simulated_trading()
            elif select_int == 2:
                print("\nYou select: 2 - View Trading History \n")
                simulated_trading.view_historical_trading()
            else:
                print("\nYou select: 3 - Exit Simulated Trading")
                break
def simulated_trading_main ( self ) : simulated_trading = SimulatedTrading ( ) file_exist = simulated_trading . check_file_exist ( ) if not file_exist : simulated_trading . setup_account ( ) while True : select_str = input ( "Here is the Simulated Trading Menu: \n" "1 - Start Simulated Trading \n" "2 - View Trading History\n" "3 - Exit Simulate Trading \n" "Please enter number 1-3 to select actions: " ) try : select_int = int ( select_str ) except ValueError : print ( "Error: You must enter an 1-digit integer." ) continue if not 1 <= select_int <= 3 : print ( "Error: You must enter the number between 0 and 3(inclusive)." ) continue if select_int == 1 : print ( "\nYou select: 1 - Start Simulated Trading \n" ) simulated_trading . simulated_trading ( ) elif select_int == 2 : print ( "\nYou select: 2 - View Trading History \n" ) simulated_trading . view_historical_trading ( ) else : print ( "\nYou select: 3 - Exit Simulated Trading" ) break
Prompt user to select actions in the submenu.
Prompt user to select actions in the submenu .
"""Prompt user to select actions in the submenu.""" # check if need to initialize the trading account
 # prompt user to select actions in the submenu
 # start validate input
 # 1 - Start Simulate Trading
 # 2 - View Trading History   
 # 3 - Exit   

self