# Programming Assignment 7 Multi-dimensional lists

CS 112 – Spring 2020 – Programming Assignment 7 Multi-dimensional lists Due Date: Sunday, March 22nd, 11:59pm
Assignment basics file:  https://piazza.com/class_profile/get_resource/k4wblafqtoj2cx/k5x3ennufm34cg
Tester file:  will be available in a few days

#### Background

The purpose of this assignment is to practice building, inspecting, and modifying multi-dimensional lists effectively. This often requires nested for-loops, but not always. It involves thinking of the structure like an MxN matrix of labeled spots, each with a row and column index, or a higher dimensional structure like a 3D matrix (e.g. MxNxK) that has indexes for height, width and depth. Multi-dimensional lists aren’t conceptually more difficult than single-dimension lists, but in practice the nested loops, aliasing, and more complex traversals and interactions merit some extra practice and thought.

#### Guidelines

• You are not allowed to import anything.
• You are not allowed to use sets and dictionaries
• You are not allowed to use anything that hasn’t been covered in class, including the list comprehension construct (if you don’t know what this is, don’t worry, it’s impossible to use it by accident!)
•  From built-in functions, you are allowed to call only range(), len(), int(), str()
• From list methods, you are allowed to use only .append() and .insert(). Please do not ask on piazza whether you can use .sort(), .remove(), .pop() .count() etc.
• You are not allowed to use slicing in any form.
• The only allowed method to remove an item from a list is the del operator.
• You are not allowed to hard-code exhaustive if-elif-elif statements to handle all possible list lengths. Your code should work with any list length.

#### Assumptions

You may assume that:

• The types of the values that are sent to the functions are the proper ones, you don’t have to validate them (e.g. word is a string, not an integer, etc.).

• The functions are going to be called with usable values, you don’t have to validate them (e.g. table contains single-character strings only).

#### Testing

Code is well commented:

Tester calculations correct:

Unknown test cases

TOTAL:
2 8 60 30 100
# see assignment basics file for file requirements! # see assignment basics file for how to comment! # see assignment basics file for how to test! # test cases that are omitted from the tester
Note: If your code does not run and crashes due to errors, it will receive zero points. Turning in running code is essential.

#### Functions

This content is for IT & Web programming task members only.