+ 1
Guys is this code faulty coz i am confused if i try it out on ma pc it works but for solo learn project it has refused.
total = 0 passenger = 1 while passenger <= 5: age = int(input("Age: ")) if passenger == 5: if age > 2: total += 100 print(total) break elif age <= 2: print(total) break if age > 2: passenger += 1 total += 100 elif age <= 2: passenger += 1 continue
2 Réponses
+ 4
Also, you don't need to add prompt messages in your solution.
age = int(input())
+ 1
in sololearn all input needs to be given at the start of the program. each input must be seperated by a new line when it asks you for input. sololearn is not the best place for interactive programs