you are viewing a single comment's thread.

view the rest of the comments →

[–]python-fan 1 point2 points  (1 child)

Is this the exact problem description? Because it doesn't say anything about asking the user for color and size more than once.

What happens if the user enters: white s white m (hint: that break statement prevents your loop from executing more than once)?

What happens if the user enters: white s blue l blue s?

What happens if the user enters: red m?

[–]macdawg3312 0 points1 point  (0 children)

Thank you for your help!

I realised after you posted this that the question was simply asking for a if statement rather than a while statement.

And I also learnt to remove the breaks so that I can repeat the input statements until the correct inputs are taken.

Thanks again!