def compare_2(): car_1 = input("What is the first car you would like to compare? ") car_2 = input("What is the second car you would like to compare? ") if car_1 == "crx": column_1 = "crx" x = stats.crx() if car_1 == "silvia": x = stats.silvia() column_1 = "silvia" if car_1 == "ecripse": x = stats.ecripse() column_1 = "ecripse" if car_1 == "tucson": x = stats.tucson() column_1 = "tucson" if car_2 == "crx": y = stats.crx() column_2 = "crx" if car_2 == "silvia": y = stats.silvia() column_2 = "silvia" if car_2 == "ecripse": y = stats.eripse() column_2 = "ecripse" if car_2 == "tucson": y = stats.tuscon() column_2 = "tucson" print(column_1, " ", column_2) print(x("HP"), "-------------------", (y(("HP")))) print(x)
def handle_car_select(searched_stat): valid_number_1 = False while not valid_number_1: try: car = int(input("enter number of car: ")) if car == 1: print(searched_stat, " = ", str(stats.crx(searched_stat))) if car == 2: print(searched_stat, " = ", str(stats.silvia(searched_stat))) if car == 3: print(searched_stat, " = ", str(stats.eclipse(searched_stat))) if car == 4: print(searched_stat, " = ", str(stats.tucson(searched_stat))) if car == 5: car = "quit" return QUIT_CODE print("You pressed, ", car) valid_number_1 = True return car except NameError: print("Your car choice was not allowed") except ValueError: print("You fool that was not even a number.")
def compare_1(): searched_stat= input("what type of stat are you looking for HP, TQ, weight? ") car = input("enter choice of car\n crx, silvia, eclipse or tucson: ") if car == "crx": print(searched_stat," = ",str(stats.crx(searched_stat))) if car == "silvia": print(searched_stat," = ",str(stats.silvia(searched_stat))) if car == "ecripse": print(searched_stat," = ",str(stats.ecripse(searched_stat))) if car == "tucson": print(searched_stat," = ",str(stats.silvia(searched_stat)))
def compare_1(): searched_stat= input("what type of stat are you looking for HP, TQ, weight? ") car = input("enter choice of car\n crx, silvia, eclipse or tucson: ") if car == "crx": print(searched_stat," = ",str(stats.crx(searched_stat))) if car == "silvia": print(searched_stat," = ",str(stats.silvia(searched_stat))) if car == "ecripse": print(searched_stat," = ",str(stats.ecripse(searched_stat))) if car == "tucson": print(searched_stat," = ",str(stats.silvia(searched_stat))) car_2 = input("What is the second car you would like to c") car_1 = input("What is the first car you would like to compare? ") car_2 = input("What is the second car you would like to compare? ") if car_1 == "crx": column_1 = "crx" if car_1 == "silvia": column_1 = "silvia" if car_1 == "ecripse": column_1 = "ecripse" if car_1 == "tucson": column_1 = "tucson" if car_2 == "crx": column_2 = "crx" if car_2 == "silvia": column_2 = "silvia" if car_2 == "ecripse": column_2 = "ecripse" if car_2 == "tucson": column_2 = "tucson" print(column_1, " ", column_2) print(stats.silvia"-------------------",stats.crx)