CSC111 A Form Generator Program

From dftwiki3
Revision as of 07:57, 27 September 2011 by Thiebaut (talk | contribs) (Solution Program)
Jump to: navigation, search

--D. Thiebaut 08:54, 27 September 2011 (EDT)


Exercise

Write a Python program that displays forms around names. The forms can be used to record information about candidates for a particular position, for example.

Below is an example of an interaction between the user and the finished program:

>>> ================================ RESTART ================================
>>> 

       +--------------------------------------+
       |formgen.py        | Date:             |
       |                  +-------------------+
       |                                      |
       +--------------------------------------+
       |                                      |
       |      AUTOMATIC FORM GENERATOR        |
       |                                      |
       |                                      |
       |                                      |
       +--------------------------------------+


Width of box?  40
Height of blank box? 4
How many names? 3
> Alice 
> Tintin et Milou
> Bugs Bunny






+--------------------------------------+
|Alice             | Date:             |
|                  +-------------------+
|                                      | 
+--------------------------------------+
|                                      |
|                                      |
|                                      |
|                                      | 
+--------------------------------------+

+--------------------------------------+
|Tintin et Milou   | Date:             |
|                  +-------------------+
|                                      |
+--------------------------------------+
|                                      |
|                                      |
|                                      |
|                                      | 
+--------------------------------------+

+--------------------------------------+
|Bugs Bunny        | Date:             |
|                  +-------------------+
|                                      | 
+--------------------------------------+
|                                      |
|                                      |
|                                      |
|                                      | 
+--------------------------------------+


>>>


Solution Program


...