Jan-17-2018, 11:22 PM
Instructions:
First get input for color and size
White has sizes L, M
Blue has sizes M, S
print avaiable or unavailable, then
print the order confirmation of color and size
* hint: set a variable "available = False" before nested if statements and
change to True if color and size are avaiable*
# [ ] create shirt order using nested if
my code:
First get input for color and size
White has sizes L, M
Blue has sizes M, S
print avaiable or unavailable, then
print the order confirmation of color and size
* hint: set a variable "available = False" before nested if statements and
change to True if color and size are avaiable*
# [ ] create shirt order using nested if
my code:
color = input("Choose color between white and blue: ") size = input("Choose size: ") available = False while True: if color == "white": if size == "M" or size == "L": print("available") available = True else: print("unavailable") elif color == "blue": if size == "M" or size == "S": print("available") else: print("unavailable") else: print("Please choose the correct color!")whatever I add outcome is always infinite loop. I would appreciate if you give me some ideas how to solve this. For example, I do not understand the function of available = False/ True.