Difference between revisions of "CSC111 A Form Generator Program"

From dftwiki3
Jump to: navigation, search
(Solution Program)
(Exercise)
Line 70: Line 70:
 
  +--------------------------------------+
 
  +--------------------------------------+
 
   
 
   
 
+
 
+
>>>
+
>>>
 
 
  
 
==Solution Program==
 
==Solution Program==

Revision as of 07:58, 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:             |
|                  +-------------------+
|                                      | 
+--------------------------------------+
|                                      |
|                                      |
|                                      |
|                                      | 
+--------------------------------------+



>>>

Solution Program


...