If statements and while loops

Welcome!

Please post code as text not pictures. Its very hard to read the images.
See About the Python Help category for how to do this.

if sex == 'men' or 'Men':

Is executed as this; the or 'Men' part is always True.

if (sex == 'men') or 'Men':
# becomes
if (sex == 'men') or True:
# becomes
if True:

You can write that a number of ways depening on you needs:

if sex == 'men' or sex == 'Men':
if sex in ('men', 'Men'):
if sex.lower() == 'men':
1 Like