Gullible

Tags: tiny, beginner, humour

In this short and simple program, you can learn the secret and subtle art of keeping a gullible person busy for hours. I won’t spoil the punch line here. Copy the code and run it for yourself. This project is great for beginners, whether you’re smart or … not so smart.

gullible.py
 1"""Gullible, by Al Sweigart al@inventwithpython.com
 2How to keep a gullible person busy for hours. (This is a joke program.)
 3This code is available at https://nostarch.com/big-book-small-python-programming
 4Tags: tiny, beginner, humor"""
 5
 6print('Gullible, by Al Sweigart al@inventwithpython.com')
 7
 8while True:  # Main program loop.
 9    print('Do you want to know how to keep a gullible person busy for hours? Y/N')
10    response = input('> ')  # Get the user's response.
11    if response.lower() == 'no' or response.lower() == 'n':
12        break  # If "no", break out of this loop.
13    if response.lower() == 'yes' or response.lower() == 'y':
14        continue  # If "yes", continue to the start of this loop.
15    print('"{}" is not a valid yes/no response.'.format(response))
16
17print('Thank you. Have a nice day!')

https://inventwithpython.com/bigbookpython/project32.html