Project 1: Fix my bugs and add comments

Start: Tuesday, September 3rd or Thursday September 5th, 2024; Due: Monday, September 9th, by the beginning of class


Overview

This project should help you refresh your Python programming skills in finding bugs in the given code as well as adding documentation.

You should work on this project individually.

Part 1: Fix broken code

For this lab, you will be finding and fixing bugs as well as adding documentation to the files.

  1. buggyLab.py: The main file for this lab.
  2. group.py: The class implementing a simple group.
Your assignment is to find and fix the bugs and add helpful documentation, including docstrings.

When working, running the buggyLab.py file, it should prompt the user for names of the people who are in your group until you press enter with no other characters. For each name entered, it should add them to the appropriate variable in the group. When you are done adding people, it should print out your group.

This is a sample transcript of running the code in PyCharm:

Enter the next person.
Press return without any other characters to end.
Jeff
Enter the next person.
Press return without any other characters to end.
Lou
Enter the next person.
Press return without any other characters to end.

My group: Jeff, Lou

Process finished with exit code 0
	    

What you must do

  1. First, you should find and fix the errors in both files. You may be able to do this without first running the code, but I doubt it. You will most likely require some number of iterations of attempting to run it, encountering and error or incorrect output/behavior, then fixing that.
  2. Add comments where appropriate including docstrings for each function or method. If you added comments while you were proceding through step one, this should be very easy. I strongly recommend that you get in that habbit.

What you must hand in

For this project, you must submit the following files via Moodle.

  1. buggyLab.py: the main file for the lab.
  2. group.py: the class file implementing the group object.
  3. transcript.txt: the transcript of running the working version of buggyLab.py. This may be copied from PyCharm's console or wherever appropriate based on how you are running it.

Grading Guide

We will be using this grading guide when grading your lab.

Submission

Submit buggyLab.py, group.py, and transcript.txt via Moodle. Be sure to select 2025 f-mcs-178-001, which is your lecture section, then click on the MCS-178 Project 1 Submission link.