13.1. General Lab Instructions

13.1.1. Venue

  • Attend the lab section that you are signed up for (check Aurora)

  • Each lab should be completed inside the Runestone Textbook

  • For each part of the lab, show your code to the lab instructor, who may ask you questions to ensure that you did the lab yourself and understand it

  • You can show all three parts to the instructor at once (i.e., don’t wait to work on Part 2 until Part 1 gets checked off)

13.1.2. Getting Help From Labmates

Labs are meant to be both a learning experience and a normative assessment. You must do your lab yourself, but it is okay to get help from lab mates. You can look at one another’s code and ask each other questions about your code. However, any code that is in your lab must be typed by you (not copied from someone else) and you must understand what and why you are typing that code. If you can’t explain what the code does or why it works, you will not get full credit. If someone asks you for help with the lab, don’t just tell them what to type if you have yours working. Explain to them what is wrong with their code or how you did yours and why.

Do NOT post solutions to labs on Piazza or in any other channels (such as a telegram chat, discord server, etc.).

13.1.3. Grading

Each lab has three levels (parts) and is scored out of 4 points: * Each completed level is worth 1 point. * There is 1 point for properly commenting your code.

13.1.4. Formatting/Commenting

Remember to do the following for each lab Level:

  1. Add your full name, student ID and lab section in a comment at the top of the code

  2. Add the date in a comment under your name

  3. Use good spacing around blocks of code, functions, etc.

  4. Use proper indenting (4 spaces for each level of indentation)

  5. Add a comment before any code that does something that isn’t obvious

  6. Add a comment above any functions you create to explain what the function is for

  7. Use proper (descriptive, but not insanely long) variable names.

  8. If you are using constants (variables whose values NEVER change during the program), use ALL_CAPS (eg. DAYS_IN_WEEK = 7)

Tip

Good variable name examples: student_id, num_points, box_width, y_scale_factor

Tip

Bad variable name examples: var, temp, this_students_id_number, BoxWidth

You have attempted of activities on this page