Answers for "how to use a while loop in an if/elif/else statement"

0

how to use a while loop in an if/elif/else statement

print("welcome")
while 1 != 2:
 greeting = str(input("Hi, how are you?")
 if greeting == ("bad"):
  print("Don't worry!")
 elif greeting == ("good"):
  print("That's great!")
 else:
  print("Got it.)
# The greeting will continuously loop and letting you answer the question.
Posted by: Guest on October-24-2021

Code answers related to "how to use a while loop in an if/elif/else statement"

Browse Popular Code Answers by Language