+ 1
How we get that output..?
sex="F" if(sex=="m"or"M"): print("Male") else: print("Female") O/p:-- Male Can any one explain...
1 Respuesta
+ 11
line 2 in code is:
if(sex=="m"or"M"):
but should be:
if(sex=="m"or sex == "M"):
or better use a cast:
if(sex.upper()=="M"):