OO Programming and Data Structures | CS 241

03 Prepare : Checkpoint A

Objective

Demonstrate basic classes in Python.

Instructions

After completing (or while completing) the preparation material for this week, complete the following exercise.

Write a Python 3 program according to the following:

Then, create a main function that does the following:

Sample Output

The following is an example of output for this program:


Please enter your first name: Ashley
Please enter your last name: Smith
Please enter your id number: 12512

Your information:
12512 - Ashley Smith

Automatic Grading Script (TestBed)

This assignment is pass/fail. In order to receive credit, it must pass the auto-grading test script (TestBed). You can run this script as many times as you like while you are working on the assignment. The same test script will be run by the instructor for credit, so you should not be surprised at the result.

In addition, because the point of this exercise is to help you practice the use of classes. You must use classes to receive credit for this assignment.

To run the test script, log into the CS Department Linux system and run the testBed command, providing the class and test script to run as well as the Python program to use, for example:


testBed cs241/check03a check03a.py

Submission

Submit your program by logging into the CS Department Linux system, and running the submit command with your filename, for example:


submit check03a.py

You should then select the appropriate course (CS 241), instructor, and assignment (check03a) from the list.