Problem 13

Your Schedule

Use several variables to store the names of your classes and their teachers. Then, display a nice little table displaying your schedule. Just FYI, my column of courses has a width of 26 characters, and the teacher column has a width of 15. The first and last lines are a plus sign, fifty dashes (a.k.a. minus signs) and another plus sign.

Your table doesn’t need to look exactly like this, or even line up. I used a total of eight variables (course1, course2, course3, … teacher1, teacher2, etc.). You should do the same.

+-----------------------------------------------------------------+
| 1 |                              English |        Mr. Sarracini |
| 2 |                                 Math |             Ms. Koon |
| 3 |                                Music |       Mr. DiGirolamo |
| 4 |                              Science |        Mr. Yeghiaian |
+-----------------------------------------------------------------+

◄ 12: Still Using Variables 14: Asking Questions ►



Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.