Question: Hi, I have a Python question related to printing out different string based on what boolean values are true. For example, if I different groups

Hi, I have a Python question related to printing out different string based on what boolean values are true. For example, if I different groups of booleans, say one for face, which are scarfFace = False, glassesFace = False, and hatFace = False, and then one for shoes, which are heelShoe = False, sandalShoe = False, and tennisShoe = False, and then have some code that basically sets some of these values to true based on certain conditions, how would I print out what is needed? Let's say we have, based on the conditions, that glassesFace = True, scarfFace = True, and tennisShoe = True. After this, how would I print out something like "Your outfit options will be [[glasses, scarf], [tennisshoe]]"? Keep in mind any of the booleans can be true so it could also be something like hatFace = True, heelShoe = True, and sandalShoe = True and end up printing "Your outfit options will be [[hat], [heels, sandals]]". Comment for any confusion, and I will be sure to rate if the answer helps me in any way. Thank you.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!