Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

23
Newbie working on beginner projects. Figured the magic 8 ball out pretty quickly, looking for feedback and guidance on GUI portion
Post Body

Hey all,

First week with programming and I am working my way through the beginner project list I found here (https://docs.google.com/document/d/1TyqD2_oDtiQIh_Y55J5RfeA91JJECc97xYIKM112H9I/edit )

I tried magic 8 ball this evening and figured it out pretty quickly once I found some documentation on random.choice()

Can anyone give feedback on how I did it vs some other ways I might have approached it? Secondly, what are good beginner resources on GUI/adding simple buttons? I want to go for that bonus challenge.

import random
import time


answers = ['Yes','No','Maybe','Ask later']
play_again = "Yes"
while play_again == "Yes" or "Y" or "Yes." or "Ok":
    input('Please ask me a Yes/No question. ')
    print('\nThinking..\n')
    time.sleep(3)
    print(random.choice(answers)) 
    play_again = input('Would you like to play again? ')

Thank you!

Author
Account Strength
100%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
11,540
Link Karma
432
Comment Karma
11,084
Profile updated: 4 days ago
Posts updated: 2 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago