+ 1
Half-working short program
Why can I get it to work if I type “male” when prompted but not when I type “female” when prompted https://code.sololearn.com/c10CvaGhbBuM/?ref=app
1 Respuesta
+ 7
You should get input for gender only once.
#enter gender
gender = input("")
if gender == "male":
x = 78
if gender == "female":
x = 80
Also, the code playground here at SoloLearn requires that you provide all the input before executing the program, and different inputs must be separated in different lines.
So after my correction, you should provide input such as:
female
26
Hope this helps!! 😁👍🏻