@JustARatherRidi/

Magic 8 Ball

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.6097278614466142","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IG9zCmltcG9ydCBtYXRoCmltcG9ydCByYW5kb20KaW1wb3J0IHRpbWUKCgp3aGlsZSBUcnVlOgogIG9zLnN5c3RlbSgnY2xlYXInKQogIAogICMgUHJvbXB0cyB1c2VyIHRvIGVudmlyb25tZW50CiAgcHJpbnQgKCJUaGlzIGlzIGEgbWFnaWMgZWlnaHQgYmFsbC4gUGxlYXNlIGVudGVyIHlvdXIgeWVzL25vIHF1ZXN0aW9uLlxuXG4iKQogICMgUHJvbXB0cyB1c2VyIHRvIGVudGVyIGlucHV0CiAgcXVlc3Rpb24gPSBpbnB1dCgnRW50ZXIgSGVyZS5cbicpCiAgCiAgIyBTZXRzIHRoZSB2YXJpYWJsZSBmb3IgdGhlIHJhbmRvbSBpbnRlZ2VyIHVzZWQgdG8gZGVmaW5lIHdoYXQgeW91ciBhbnN3ZXIgd2lsbCBiZS50aW1lCiAgYW5zID0gcmFuZG9tLnJhbmRpbnQoMSwyMCkKICBwcmludCAoIlxuIikKICAjIEJlZ2lucyB3b3JkIGJhbmsKICBpZiBhbnMgPT0gMToKICAgICMgUHJpbnRzIGEgZmVlZGJhY2sgYW5zd2VyCiAgICBwcmludCAoJ0l0IGlzIGNlcnRhaW4uJykKICAgICMgQ2F1c2VzIHRoZSBwcm9ncmFtIHRvIHdhaXQgYW5kIHNob3cgdGhlIHRleHQgYmVmb3JlIGNsb3NpbmcgdGhlIHByb2dyYW0uIEZvciBhZXN0aGV0aWMuCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDI6CiAgICBwcmludCAoJ0FzIEkgc2VlIGl0LCB5ZXMuJykKICAgIHRpbWUuc2xlZXAoMikKICBpZiBhbnMgPT0gMzoKICAgIHByaW50ICgnRG9uXCd0IGNvdW50IG9uIGl0LicpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDQ6CiAgICBwcmludCAoJ0l0IGlzIGRlY2lkZWRseSBzby4nKQogICAgdGltZS5zbGVlcCgyKQogIGlmIGFucyA9PSA1OgogICAgcHJpbnQgKCdNb3N0IGxpa2VseScpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDY6CiAgICBwcmludCAoJ0FzayBhZ2FpbiBsYXRlci4uIG1heWJlIGZpdmUgbWludXRlcz8nKQogICAgdGltZS5zbGVlcCg1KQogIAogIGlmIGFucyA9PSA3OgogICAgcHJpbnQgKCdNeSByZXBseSBpcyBuby4nKQogICAgdGltZS5zbGVlcCgyKQogIGlmIGFucyA9PSA4OgogICAgcHJpbnQgKCdXaXRob3V0IGEgZG91YnQuJykKICAgIHRpbWUuc2xlZXAoMikKICBpZiBhbnMgPT0gOToKICAgIHByaW50ICgnT3V0bG9vayBnb29kLicpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDEwOgogICAgcHJpbnQgKCdCZXR0ZXIgbm90IHRlbGwgeW91IG5vdy4nKQogICAgdGltZS5zbGVlcCgyKQogIGlmIGFucyA9PSAxMToKICAgIHByaW50ICgnTXkgc291cmNlcyBzYXkgbm8uJykKICAgIHRpbWUuc2xlZXAoMikKICBpZiBhbnMgPT0gMTI6CiAgICBwcmludCAoJ1llcywgZGVmaW5pdGVseS4nKQogICAgdGltZS5zbGVlcCgyKQogIGlmIGFucyA9PSAxMzoKICAgIHByaW50ICgnWWVzLicpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDE0OgogICAgcHJpbnQgKCdDYW5ub3QgcHJlZGljdCBub3cuJykKICAgIHRpbWUuc2xlZXAoMikKICBpZiBhbnMgPT0gMTU6CiAgICBwcmludCAoJ091dGxvb2sgbm90IHNvIGdvb2QuJykKICAgIHRpbWUuc2xlZXAoMikKICBpZiBhbnMgPT0gMTY6CiAgICBwcmludCAoJ1lvdSBtYXkgcmVseSBvbiBpdC4nKQogICAgdGltZS5zbGVlcCgyKQogIGlmIGFucyA9PSAxNzoKICAgIHByaW50ICgnU2lnbnMgcG9pbnQgdG8geWVzLicpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDE4OgogICAgcHJpbnQgKCdDb25jZW50cmF0ZSBhbmQgYXNrIGFnYWluLicpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDE5OgogICAgcHJpbnQgKCdWZXJ5IGRvdWJ0ZnVsLicpCiAgICB0aW1lLnNsZWVwKDIpCiAgaWYgYW5zID09IDIwOgogICAgcHJpbnQgKCdTdXJlLicpCiAgICB0aW1lLnNsZWVwKDIpCgoKCg=="},"asBuffer":null},"loaded":true}}
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import os
import math
import random
import time


while True:
  os.system('clear')
  
  # Prompts user to environment
  print ("This is a magic eight ball. Please enter your yes/no question.\n\n")
  # Prompts user to enter input
  question = input('Enter Here.\n')
  
  # Sets the variable for the random integer used to define what your answer will be.time
  ans = random.randint(1,20)
  print ("\n")
  # Begins word bank
  if ans == 1:
    # Prints a feedback answer
    print ('It is certain.')
    # Causes the program to wait and show the text before closing the program. For aesthetic.
    time.sleep(2)
  if ans == 2:
    print ('As I see it, yes.')
    time.sleep(2)
  if ans == 3:
    print ('Don\'t count on it.')
    time.sleep(2)
  if ans == 4:
    print ('It is decidedly so.')
    time.sleep(2)
  if ans == 5:
    print ('Most likely')
    time.sleep(2)
  if ans == 6:
    print ('Ask again later.. maybe five minutes?')
    time.sleep(5)
  
  if ans == 7:
    print ('My reply is no.')
    time.sleep(2)
  if ans == 8:
    print ('Without a doubt.')
    time.sleep(2)
  if ans == 9:
    print ('Outlook good.')
    time.sleep(2)
  if ans == 10:
    print ('Better not tell you now.')
    time.sleep(2)
  if ans == 11:
    print ('My sources say no.')
    time.sleep(2)
  if ans == 12:
    print ('Yes, definitely.')
    time.sleep(2)
  if ans == 13:
    print ('Yes.')
    time.sleep(2)
  if ans == 14:
    print ('Cannot predict now.')
    time.sleep(2)
  if ans == 15:
    print ('Outlook not so good.')
    time.sleep(2)
  if ans == 16:
    print ('You may rely on it.')
    time.sleep(2)
  if ans == 17:
    print ('Signs point to yes.')
    time.sleep(2)
  if ans == 18:
    print ('Concentrate and ask again.')
    time.sleep(2)
  if ans == 19:
    print ('Very doubtful.')
    time.sleep(2)
  if ans == 20:
    print ('Sure.')
    time.sleep(2)