So I’m struggling to get down the coding for an assignment I’m doing I’ve tried so many different ways but I can’t get the code to run correctly.
brand = (input('Please select a brand: '))
brand1 = "Storm"
brand2 = "Roto-Grip"
if brand1:
model= (input('Please select a model: '))
storm_G = "Gravity"
storm_T = "Tropical"
storm_H = "Hy-Road"
storm_E = "Electrify"
if storm_G:
color = (input('Please select a color: '))
G_fire = "Fire"
G_crimson ="Crimson"
if color != {G_fire}:
if color != {G_crimson}:
print (f'Sorry, {brand1} {storm_G} is only available in {G_fire} and {G_crimson}.')
elif storm_T:
color = (input('Please select a color: '))
T_cherry = "Cherry"
T_rainbow = "Rainbow"
if color != {T_cherry} and color != {T_rainbow}:
print (f'Sorry, {brand1} {storm_T} is only available in {T_cherry} and {T_rainbow}.')
At first, the first section was running fine but then I moved on to the brand's second model and noticed even if I put the color in correctly the result was the sorry message from both the if and elif statement. Now I can't even get the first code to run correctly. There are going to be 2 more models with 2 different color choices for each and 4 different models (2 colors each) of the second brand. I just need help with these sorry messages that keep popping up. If the user enters in a model but a color that the model does not have then a sorry message should prompt. As I said earlier once I get to the color input on the output no matter what I do I am prompt with the sorry message for both statements,
"Sorry, Storm Gravity is only available in Fire and Crimson."
"Sorry, Storm Tropical is only available in Cherry and Rainbow."
If there's anyone that can help it would truly be appreciated.