Help me with my script?
I have created a script which asks you "How many students in your class?", for example i type in 3, it says, "Enter gender of student No." like 1 to the number you entered, you should write f for female m for male, if you write anything else it will start from where you were, if you did student number 2 wrong it will ask you student number 2 again. and finally it says the amount of females and males. and what i want it is to like finally say 1. male 2. female 3. male 4. male and even if you type 100 students it will go to that number. I hope you get what i mean. Thanks! a = int(input("How many students in your class?")) b = str() ttlM = 0 ttlF = 0 StuGndr = [] i = 1 while i <= a: b = input("Enter gender of student No." + str(i)) if (b == "m" or b == "M"): i += 1 ttlM += 1 elif (b == "f" or b == "F"): i += 1 ttlF += 1 else: print("Invalid") print("There are " + str(ttlM) + " males and " + str(ttlF) + " females")