Answers for "using while loop in python taking input until it matches the desired answer"

0

using while loop in python taking input until it matches the desired answer

# take userinput and will keep asking same question
# until gets the desired/set output

i = 'yes'
while True:
    n = str(input('Are we going on a date?: '))
    if n == i:
        print('We are going on a Date')
        break
Posted by: Guest on April-22-2022

Code answers related to "using while loop in python taking input until it matches the desired answer"

Python Answers by Framework

Browse Popular Code Answers by Language