-3

i'm absolutley garbage at python 3. this may not be a hard question but ive tried for hours to create a solution to this question and cant make a functioning code. i've used while and if statements.

"As the user enters passenger details such as e-ticket number, full name, and destination, the program validates the user input. If an invalid input is entered,the program displays an appropriate error message and asks the user to re-enter invalid values until each entry is correct"

Kwadwo
  • 1
  • Can you provide a minimal reproducible code example, thanks. – jairoar Sep 18 '20 at 16:57
  • Please share what you have tried and tell us exactly what is not working. SO is not a place to ask for homework solutions. – runDOSrun Sep 18 '20 at 16:58
  • Please repeat [on topic](https://stackoverflow.com/help/on-topic) and [how to ask](https://stackoverflow.com/help/how-to-ask) from the [intro tour](https://stackoverflow.com/tour). “Show me how to solve this coding problem” is not a Stack Overflow issue. We expect you to make an honest attempt, and *then* ask a *specific* question about your algorithm or technique. We also expect you to do appropriate research before posting. Simply searching Stack Overflow for your title brings up the solution. – Prune Sep 18 '20 at 17:04

1 Answers1

-1

this is very easy

helle.py

while True:
    inputdata = input()

    if inputdata != "valid":
        print("not valid")
    else:
        print("valid")
        break
Al Mahdi
  • 635
  • 1
  • 9
  • 16
  • 1
    Please do not answer off-topic questions. We don't want people to flood Stack Overflow with attempts to cheat on their homework. – Prune Sep 18 '20 at 17:02