Difference between revisions of "CSC111 A Form Generator Program"

From dftwiki3
Jump to: navigation, search
(Exercise)
(Exercise)
Line 13: Line 13:
 
   
 
   
 
         +--------------------------------------+
 
         +--------------------------------------+
         |formgen.py       | Date:            |
+
         |formgen.py       | Date:            |
 
         |                  +-------------------+
 
         |                  +-------------------+
 
         |                                      |
 
         |                                      |
Line 38: Line 38:
 
   
 
   
 
  +--------------------------------------+
 
  +--------------------------------------+
  |Alice             | Date:            |
+
  |Alice             | Date:            |
 
  |                  +-------------------+
 
  |                  +-------------------+
 
  |                                      |  
 
  |                                      |  

Revision as of 07:55, 27 September 2011

--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:             |
|                  +-------------------+
|                                      | 
+--------------------------------------+
|                                      |
|                                      |
|                                      |
|                                      | 
+--------------------------------------+


>>>