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

In this assignment, testing will be done as before. You will start working on the assignment without a tester, and you will do your own testing based on the examples we provide in this document as well as other examples you can come up with. A few days later we will provide an actual tester but don’t wait for it in order to start working on the assignment as there won’t be enough time to complete it before the deadline. The purpose of the delayed release of the tester is for you to put more emphasis/ effort on writing logically correct programs instead of trying to pass certain tests only. When we post the tester, we’re going to omit some of the test cases that will be used for grading. This means that there might be errors in your code even if the tester is giving you no errors. You must do your own checks to make sure that you haven’t missed anything and your code is correct. You do not need to modify the tester, just test on your own any way you like. Again, the goal is to help you put more focus on writing logically correct programs instead of trying to pass certain tests only.
Grading Rubric Submitted correctly:

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.
Log In Register