-3

I am creating a program that prints a line of text based upon the value the user enters. I am going to use an “if, elif” statement.

Example: if age (what the user entered) <= 1: Print(“this is an infant”)

I also need the entire thing, the input and the if elif statement, to repeat until the user enters a zero…I’m totally stumped on getting the statement to loop without having the text repeat continuously.

1 Answers1

0
print("Enter your age")
while True:
    age = int(input())
    if age <= 1:
        print("Infant")

Kindly adjust this code with yours.
I hope that helps.

Łukasz Kwieciński
  • 14,992
  • 4
  • 21
  • 39
Ojas_Gupta
  • 107
  • 10