Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """Input Verification Yes/No dubwhile, revised/modified by Raven Scott 11/30/2022"""
- """Original Author: Juan Martinez, "short boolean script" source: stack, 2/05/2019"""
- yesNo = False
- while not yesNo:
- something = input("Enter something: ")
- yesNo = input(f"If {something} is true: Enter y/n: ")
- if yesNo.casefold() == 'y':
- break
- if yesNo.casefold() == 'n':
- yesNo = False
- else:
- noYes = False
- while not noYes:
- yesNo = input("Please enter y/n:")
- if yesNo.casefold() == 'y':
- noYes = True
- if yesNo.casefold() == 'n':
- noYes = False
- yesNo = False
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement