I had the code working when you could only put in the gender with a capital but I added more to allow the user to input their gender with a lower case to make it more user friendly. I was doing research to be able to have both "Male" and "male" to be assigned to the same variable "M" and the same for female but I could not figure it out. I decided to assign each word with its own variable and then ask the if statement to be true if either variable was called from user input. Now when I have this, both if statements come out true and print their message no matter the circumstance. The code is written in python on Replit. This is the code:
gender = input("Please state your gender: ")
M = 'Male'
F = 'Female'
m = 'male'
f = 'female'
if gender == M or m:
print("You are a male")
if gender == F or f:
print("You are a female")