Question: Firstly, you're using stack_array.py: https://bohr.wlu.ca/cp164/labs/lab02/stack_array.txt def stack_test(a): ------------------------------------------------------- Tests Use: stack_test(a) ------------------------------------------------------- Preconditions: a - list of data (list of ?) Postconditions: the methods

Firstly, you're using stack_array.py: https://bohr.wlu.ca/cp164/labs/lab02/stack_array.txt def stack_test(a): """ ------------------------------------------------------- Tests Use: stack_test(a) ------------------------------------------------------- Preconditions: a - list of data (list of ?) Postconditions: the methods of Stack are tested for both empty and non-empty stacks using the data in a: empty, push, pop, peek ------------------------------------------------------- """ s = Stack() # tests for the stack methods go here # print the results of the method calls and verify by hand return 

Read carefully, also there's 2 seperate modules, this is the function and you're importing it to the other module (main).

Add this function to the Pydev module named utilities in your login_data_structures project.

Use a list of integers to test your stack code.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!