testStack.Push(5) print(testStack.items) testStack.Push(76) print(testStack.items) # .Pop() print(testStack.Pop()) # .Contains() print(testStack.Contains(5)) print(testStack.Contains(76)) print() #--------------------QUEUE METHODS--------------------# testQueue = Queue() # .Append() testQueue.Append("Dog") testQueue.Append("Cat") testQueue.Append("Turtle") print(testQueue.items) # .Pop() print(testQueue.Pop()) print(testQueue.items) # .Contains() print(testQueue.Contains("Cat")) print(testQueue.Contains("Lizard")) print()
#Using append function to create a new list of words testQueue.Append("Rat") testQueue.Append("Snack") testQueue.Append("Borlap") #Testing if the Pop funciton works, # Checking whats in the lest, # Checking if list contains item that was popped, # Checking if list contains item that was not popped, # Checking if list contains item that never existed within it print('Stack Test') print(testStack.Pop()) print(testStack.items) print(testStack.Contains('Beenus')) print(testStack.Contains('Freenus')) print(testStack.Contains('Wack')) print('') #Testing if the Pop funciton works, # Checking whats in the lest, # Checking if list contains item that was popped, # Checking if list contains item that was not popped, # Checking if list contains item that never existed within it print('Queue Test') print(testQueue.Pop()) print(testQueue.items) print(testQueue.Contains('Snack')) print(testQueue.Contains('Rat')) print(testQueue.Contains('Wack'))