PriceHistory.py
def price_history_main(self):
        """Prompt user to select actions in the submenu.""" 
        while True:
            # prompt user to select actions in the submenu
            select_str = input("Here is the Historical Price Menu: \n"
                               "1 - View Historical Price For A Day \n"
                               "2 - View Historical Price For A Period \n"
                               "3 - Exit View Historical Price \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 - View Historical Price For One Day
            if select_int == 1:
                print("\nYou select: 1 - View Historical Price For A Day")
                interval = "one"
                one_date_history = PriceHistory()
                one_date_history.price_chart(interval)
            # 2 - View Historical Price For A Period    
            elif select_int == 2:
                print("\nYou select:2 - View Historical Price For A Period")
                interval = "period"
                time_period_history = PriceHistory()
                time_period_history.price_chart(interval)
            # 3 - Exit   
            else:
                print("\nYou select: 3 - Exit View Historical Price")
                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 price_history_main(self):
        while True:
            select_str = input("Here is the Historical Price Menu: \n"
                               "1 - View Historical Price For A Day \n"
                               "2 - View Historical Price For A Period \n"
                               "3 - Exit View Historical Price \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 - View Historical Price For A Day")
                interval = "one"
                one_date_history = PriceHistory()
                one_date_history.price_chart(interval)
            elif select_int == 2:
                print("\nYou select:2 - View Historical Price For A Period")
                interval = "period"
                time_period_history = PriceHistory()
                time_period_history.price_chart(interval)
            else:
                print("\nYou select: 3 - Exit View Historical Price")
                break
def price_history_main ( self ) : while True : select_str = input ( "Here is the Historical Price Menu: \n" "1 - View Historical Price For A Day \n" "2 - View Historical Price For A Period \n" "3 - Exit View Historical Price \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 - View Historical Price For A Day" ) interval = "one" one_date_history = PriceHistory ( ) one_date_history . price_chart ( interval ) elif select_int == 2 : print ( "\nYou select:2 - View Historical Price For A Period" ) interval = "period" time_period_history = PriceHistory ( ) time_period_history . price_chart ( interval ) else : print ( "\nYou select: 3 - Exit View Historical Price" ) 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.""" # prompt user to select actions in the submenu
 # start validate input
 # 1 - View Historical Price For One Day
 # 2 - View Historical Price For A Period    
 # 3 - Exit   

self