repl.it
@KisituSamuel/

Magic8Ball

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Import the modules
import sys
import random

ans = True

while ans:
    question = input("Ask the magic 8 ball a question: (press Enter) ")
    answers = random.randint(1,12)
    
    print ("Please Wait, in progress...")
    import time
    time.sleep(3) 

    if question == "":
        sys.exit()
    
    elif answers == 1:
        print ("YESSSSSS")
    
    elif answers == 2:
        print ("Looks good")
    
    elif answers == 3:
        print ("You may rely on it")
    
    elif answers == 4:
        print ("Not Now")
    
    elif answers == 5:
        print ("Is that what you really want")
    
    elif answers == 6:
        print ("Question unclear, try again")
    
    elif answers == 7:
        print ("Dont bother")
    
    elif answers == 8:
        print ("My gut says No")

    elif answers == 9:
        print ("Id say Wait on it")

    elif answers == 10:
        print ("Ask Andela")

    elif answers == 11:
        print ("Sometimes even I dont know")

    elif answers == 12:
        print ("HARD NO")
?