Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

8 ball responses list python

responses = ["As I see it, yes.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.",
             "Don’t count on it.", "It is certain.", "It is decidedly so.", "Most likely.", "My reply is no.", "My sources say no.",
             "Outlook not so good.", "Outlook good.", "Reply hazy, try again.", "Signs point to yes.", "Very doubtful.", "Without a doubt.",
             "Yes.", "Yes – definitely.", "You may rely on it."]
Comment

8 ball responses list python


import sys
import random

ans = True

while ans:
    question = input("Ask the magic 8 ball a question: (press enter to quit) ")

    answers = random.randint(1,8)

    if question == "":
        sys.exit()

elif answers == 1:
    print ("It is certain")

    elif answers == 2:
        print ("Outlook good")

    elif answers == 3:
        print ("You may rely on it")

    elif answers == 4:
        print ("Ask again later")

    elif answers == 5:
        print ("Concentrate and ask again")

    elif answers == 6:
        print ("Reply hazy, try again")

    elif answers == 7:
        print ("My reply is no")

    elif answers == 8:
        print ("My sources say no")
    ans = False

Comment

PREVIOUS NEXT
Code Example
Python :: selenium full screen python 
Python :: convert into date python 
Python :: get mouse click coordinates python turtle 
Python :: how to delete row pandas in for loop 
Python :: sns figsize 
Python :: pygame.rect parameters 
Python :: python - prime number generator 
Python :: find element by title selenium python 
Python :: python get full path 
Python :: python reload function from file 
Python :: convert column to datetime format python 
Python :: python euclidean algorithm 
Python :: blender python set object to active by name 
Python :: change default python version mac 
Python :: how to delete every row in excel using openpyxl 
Python :: python how to save a Seaborn plot into a file 
Python :: python press key to break 
Python :: pytorch check gpu 
Python :: dj_database_url 
Python :: df sort values 
Python :: openai gym conda 
Python :: how do i print the entire array pthon jupyter 
Python :: rename df column 
Python :: python how move file to directory 
Python :: Generate random image np array 
Python :: print json python 
Python :: how to create dataframe in python 
Python :: Counter to df pandas 
Python :: python url join 
Python :: model load pytorch 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =