loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.16999988254569054","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"Y2xhc3MgU3RhY2s6CiAgZGVmIF9faW5pdF9fKHNlbGYpOgogICAgc2VsZi5pdGVtcyA9IFtdCgogIGRlZiBwdXNoKHNlbGYsIGl0ZW0pOgogICAgc2VsZi5pdGVtcy5hcHBlbmQoaXRlbSkKCiAgZGVmIHBvcChzZWxmKToKICAgIHNlbGYuaXRlbXMucG9wKCkKCiAgZGVmIHBlZWsoc2VsZik6CiAgICByZXR1cm4gc2VsZi5pdGVtc1stMV0KCiAgZGVmIHByaW50U3RhY2soc2VsZik6CiAgICBmb3IgaSBpbiBzZWxmLml0ZW1zOgogICAgICBwcmludChpKQoKZW5jaGFudG1lbnRzID0gU3RhY2soKQplbmNoYW50bWVudHMucHJpbnRTdGFjaygpCnByaW50KCkKZW5jaGFudG1lbnRzLnB1c2goIkZpcmUgUmVzaXN0ZW5jZSIpCmVuY2hhbnRtZW50cy5wcmludFN0YWNrKCkKcHJpbnQoKQplbmNoYW50bWVudHMucHVzaCgiRnJvc3QgUmVzaXN0ZW5jZSIpCmVuY2hhbnRtZW50cy5wdXNoKCJMaWdodG5pbmcgUmVzaXN0ZW5jZSIpCmVuY2hhbnRtZW50cy5wdXNoKCJIZWFsdGggQm9vc3QiKQplbmNoYW50bWVudHMucHVzaCgiTWFnaWNrYSBCb29zdCIpCmVuY2hhbnRtZW50cy5wcmludFN0YWNrKCkKcHJpbnQoKQplbmNoYW50bWVudHMucG9wKCkKZW5jaGFudG1lbnRzLnByaW50U3RhY2soKQpwcmludCgpCnByaW50KCJUaGUgbGFzdCBpdGVtIGluIHRoZSBzdGFjayBpcyAiICsgZW5jaGFudG1lbnRzLnBlZWsoKSkKCgo="},"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
class Stack:
  def __init__(self):
    self.items = []

  def push(self, item):
    self.items.append(item)

  def pop(self):
    self.items.pop()

  def peek(self):
    return self.items[-1]

  def printStack(self):
    for i in self.items:
      print(i)

enchantments = Stack()
enchantments.printStack()
print()
enchantments.push("Fire Resistence")
enchantments.printStack()
print()
enchantments.push("Frost Resistence")
enchantments.push("Lightning Resistence")
enchantments.push("Health Boost")
enchantments.push("Magicka Boost")
enchantments.printStack()
print()
enchantments.pop()
enchantments.printStack()
print()
print("The last item in the stack is " + enchantments.peek())