loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.5356184180917896","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"I1Byb2dyYW1tZXIgTmFtZTogRXJpYyBFdmFucywgTS5FZC4KI1Byb2dyYW0gTmFtZTogTnVtYmVyIEd1ZXNzZXIgKEhpL0xvIFJhbmRvbSkKI1Byb2dyYW0gRGVzY3JpcHRpb246IFVzZXMgYSBIaS9MbyBSYW5kb20gYWxnb3JpdGhtIHRvIGRldGVybWluZSB0aGUgbnVtYmVyIGNob3NlbiB0aGUgdXNlci4KI0FsZ29yaXRobTogU3RhcnRzIHdpdGggaGkvbG8gb3IgMTAwLzEuIFNlbGVjdHMgYSByYW5kb20gbnVtYmVyIGJldHdlZW4gaGkvbG8uIEFkanVzdHMgaGkvbG8gYWNjb3JkaW5nbHkgYWZ0ZXIgZ3Vlc3MuIFJlcGVhdCBzZWxlY3Rpb24gb2YgYSByYW5kb20gbnVtYmVyIGJldHdlZW4gbmV3IGhpL2xvLiBSZXBlYXQgaGkvbG8gYWRqdXN0bWVudC4uLgojCmltcG9ydCByYW5kb20KY29ycmVjdCA9ICJOIgpoaWdoID0gMTAwCmxvdyA9IDEKZ3Vlc3NDb3VudCA9IDEKZ3Vlc3MgPSByYW5kb20ucmFuZGludChsb3csIGhpZ2gpCndoaWxlIChjb3JyZWN0ID09ICJOIik6CiAgZ3Vlc3MgPSBpbnQoZ3Vlc3MpCiAgZ3Vlc3NBc1N0cmluZyA9IHN0cihndWVzcykKICBwcmludCAoIklzIFlvdXIgTnVtYmVyICIgKyBndWVzc0FzU3RyaW5nICsgIj8iKQogIHJlc3BvbnNlID0gaW5wdXQoIltDXW9ycmVjdCAgLyAgVG9vIFtMXW93ICAvICBUb28gW0hdaWdoIikKICBpZiAocmVzcG9uc2UgPT0gIkMiKToKICAgIGd1ZXNzQ291bnRBc1N0cmluZyA9IHN0cihndWVzc0NvdW50KQogICAgcHJpbnQoIllheSEgSSBnb3QgaXQgaW4gIiArIGd1ZXNzQ291bnRBc1N0cmluZyArICIgZ3Vlc3NlcyEiKQogICAgY29ycmVjdCA9ICJZIgogIGVsaWYgKHJlc3BvbnNlID09ICJMIik6CiAgICBwcmludCAoIlRvbyBMb3cgSHVoPyIpCiAgICBsb3cgPSBndWVzcyArIDEKICAgIGd1ZXNzID0gcmFuZG9tLnJhbmRpbnQobG93LCBoaWdoKQogICAgZ3Vlc3NDb3VudCA9IGd1ZXNzQ291bnQgKyAxCiAgZWxpZiAocmVzcG9uc2UgPT0gIkgiKToKICAgIHByaW50ICgiVG9vIEhpZ2ggSHVoPyIpCiAgICBoaWdoID0gZ3Vlc3MgLSAxCiAgICBndWVzcyA9IHJhbmRvbS5yYW5kaW50KGxvdywgaGlnaCkKICAgIGd1ZXNzQ291bnQgPSBndWVzc0NvdW50ICsgMQpwcmludCAoIkV4aXRpbmcgUHJvZ3JhbSIp"},"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
#Programmer Name: Eric Evans, M.Ed.
#Program Name: Number Guesser (Hi/Lo Random)
#Program Description: Uses a Hi/Lo Random algorithm to determine the number chosen the user.
#Algorithm: Starts with hi/lo or 100/1. Selects a random number between hi/lo. Adjusts hi/lo accordingly after guess. Repeat selection of a random number between new hi/lo. Repeat hi/lo adjustment...
#
import random
correct = "N"
high = 100
low = 1
guessCount = 1
guess = random.randint(low, high)
while (correct == "N"):
  guess = int(guess)
  guessAsString = str(guess)
  print ("Is Your Number " + guessAsString + "?")
  response = input("[C]orrect  /  Too [L]ow  /  Too [H]igh")
  if (response == "C"):
    guessCountAsString = str(guessCount)
    print("Yay! I got it in " + guessCountAsString + " guesses!")
    correct = "Y"
  elif (response == "L"):
    print ("Too Low Huh?")
    low = guess + 1
    guess = random.randint(low, high)
    guessCount = guessCount + 1
  elif (response == "H"):
    print ("Too High Huh?")
    high = guess - 1
    guess = random.randint(low, high)
    guessCount = guessCount + 1
print ("Exiting Program")