import random
def main():
greetings = ['Hello', 'Hi', 'Good morning']
print(random.choice(greetings) + ', welcome to my website\n')
input('Are you a human? ')
print('Oh, never mind\n')
ans = input('How are you doing today? ').lower()
if 'sad' in ans:
print('I\'m sorry to hear that\n')
elif 'well' in ans:
print('That\'s awesome\n')
else:
print('So you are not sad\n')
ans = input('Would you like to invest in my site? ')
if ans == 'Yes':
print('I\'m so sorry, but you can trust me\n')
else:
print('Of course, I can receive anonymous payments\n')
try:
ans = float(input('How many $$ have you sent? ').strip())
if ans > 100.0:
thanks = ('That sounds good', 'Great', 'You are right')
print(random.choice(thanks) + '\n')
else:
print('Why not?\nYou are boring\nDon\'t do that\n'
'Feel free to continue\n'.split('\n')[
random.randint(-3, -1)] + '\n')
except ValueError:
print('Don\'t understand. Have you sent bitcoins?\n')
input('Do you have any questions? ')
ans = random.randrange(3)
if ans == 0:
print('Bye')
elif ans == 1:
print('Nice meeting you')
elif ans == 2:
print('I\'m done')
else:
print('Please explain it more')
if __name__ == '__main__':
main()
Comments
noice it worked
Leave a comment