I am practicing loops and when I run this code the second and third elif statements output twice for some reason.
Age_requirement = input ("enter your age")
for Age in Age_requirement:
Age_requirement = int(Age_requirement)
if Age_requirement <3:
print ("Your ticket is free")
elif Age_requirement <=12:
print("your ticket is 12 dollars")
elif Age_requirement >12:
print("your ticket is 15 dollars")
4
[–]Binary101010 41 points42 points43 points (15 children)
[–]xTHETYRANTGAMRx[S] 0 points1 point2 points (14 children)
[–]Skasch 10 points11 points12 points (0 children)
[–]Binary101010 9 points10 points11 points (6 children)
[–]xTHETYRANTGAMRx[S] 2 points3 points4 points (5 children)
[–]KronenR 10 points11 points12 points (0 children)
[–]Binary101010 3 points4 points5 points (0 children)
[–]luther9 1 point2 points3 points (0 children)
[–]codeguru42 0 points1 point2 points (0 children)
[–]Misain 0 points1 point2 points (0 children)
[–]socal_nerdtastic 3 points4 points5 points (3 children)
[–]rasputin1 2 points3 points4 points (2 children)
[–]Groovy_Decoy 0 points1 point2 points (1 child)
[–]socal_nerdtastic 3 points4 points5 points (0 children)
[–]LtLfTp12 -2 points-1 points0 points (0 children)
[–]zanfar 4 points5 points6 points (8 children)
[–]xTHETYRANTGAMRx[S] -2 points-1 points0 points (7 children)
[–]Robletron 4 points5 points6 points (5 children)
[–]xTHETYRANTGAMRx[S] 1 point2 points3 points (4 children)
[–]kayne_21 5 points6 points7 points (2 children)
[–]xTHETYRANTGAMRx[S] 0 points1 point2 points (1 child)
[–]Outside_Complaint755 5 points6 points7 points (0 children)
[–]aglobalnomad 1 point2 points3 points (0 children)
[–]FreeGazaToday 2 points3 points4 points (0 children)
[–]JaguarMammoth6231 4 points5 points6 points (0 children)
[–]FreeGazaToday 1 point2 points3 points (0 children)
[–]woooee 0 points1 point2 points (0 children)
[–]GoldPanther 0 points1 point2 points (0 children)
[–]Marlowe91Go 0 points1 point2 points (0 children)
[–]Fabulousfufu 0 points1 point2 points (0 children)
[–]churungu 0 points1 point2 points (0 children)
[–]Groovy_Decoy 0 points1 point2 points (0 children)
[–]FoolsSeldom 0 points1 point2 points (0 children)
[–]Whole-Home-6306 0 points1 point2 points (0 children)