Programming Challenges

Introduction

You will be given programming challanges throughout the semester, typically one each week. You are expected to do them by yourself, on your own time. You are also expected to print your work, and give it to your instructor at the beginning of the class when it is due.

A programming challenge is a type of homework. The idea is to give you regular practice with the class content. A programming challenge is meant to be something that you can do in one sitting, whereas a regular homework should be something that requires more thinking, breaking the problem down, and several sessions of programming.

To solve the challenge problem, enter the programming statements. Copy your session (what you type and what the computer responds with) and paste it into a document to turn in. For MATLAB, this should include the ">>" prompts (or "EDU>>" prompts). For Unix/Linux, this should include the system prompts like "$" or "username@computer:~$" or something similar.

Assignment

The programming challenges will be posted under the instructor's account on Qubit. You will need to access Qubit to get these. Look at file /home/mweeks/programming_challenge.txt to see the assignment(s).

Use a monospaced font to print your solution.

For MATLAB assignments
Some programming challenges may require MATLAB scripts or other files. In that case, use the type command to show them. For example, if you create a file called "myexample.m", you should use the command type myexample.m to display the contents of that file to the screen.

For Unix/Linux assignments
If other files are required, use the cat command to show them. For example, if you create a file called "myexample.bash", you should use the command cat myexample.bash to display the contents of that file to the screen (terminal window).

Make sure to show enough runs of your solution to reasonably prove that it works for all cases. For example, if you have an "if" statement, you should show that it works no matter if the condition is true or false. This may not apply to some programming challenges.

Documentation

This should appear at the very top of the paper you hand in. Put this information at the top-left of the page. The text in italics show where you need to make changes. You do not literally have to use italics on your printouts.

  Your Name
  CSc Class number Programming Challenge #1
  Account: your account name
  Due date: put the due date here

  Paste a log of your activity here.

Turning in your work

Turn in a hard-copy (printout) of your work. Electronic copies will not be accepted.

The printouts must be handed in at the start of class. Points may be deducted if you walk into class late, or if your assignment is not ready to hand in right away. Make sure that your printouts use a monospaced font.

Include a complete but concise log of your activity. Complete means that anyone who types in what you type will see what you report. For example, if you type disp(a) and get 6 as the response, then you must include (before this) the command that defines variable a. You should not include extraneous things. For example, you might type help diary at some point to read the documentation about the diary command. But this is extraneous unless the programming challenge specifically asks for it.

Multiple pages must be attached by staple, binder clip, paperclip, etc.

You are responsible for making the printout look professional. This means removing any extraneous or weird (non-alphanumeric) characters that might appear in the printout.

Grading

Grading for these will be very simple: we check to see that you did the work, that it is correct, and that it is on time. The grading on these programming challenges will be typically a check (full credit), a check-minus (7/10th credit), an X (half credit), or a zero (no credit). In rare cases, there might be a check-plus (full credit plus bonus points). The grader may assign other grades as he/she sees fit, such as a percentage, but this is up to the grader and may be overruled by the instructor.

To be clear, these assignments deviate from the normal policy on late work. A late programming challenge will result in a lower grade, e.g. from a check to a check minus, from a check minus to an X, or from an X to a 0.

Copyright 2010-2015, Michael Weeks