Difference between revisions of "CSC111 HW 1 2011"
(Created page with "<center> <font size="+2">Page under construction!</font> <br \>300px </center>") |
|||
Line 1: | Line 1: | ||
+ | --[[User:Thiebaut|D. Thiebaut]] 13:59, 13 September 2011 (EDT) | ||
+ | ---- | ||
+ | <br /> | ||
+ | __TOC__ | ||
+ | <br /> | ||
<center> | <center> | ||
<font size="+2">Page under construction!</font> | <font size="+2">Page under construction!</font> | ||
<br \>[[File:UnderConstruction.jpg|300px]] | <br \>[[File:UnderConstruction.jpg|300px]] | ||
</center> | </center> | ||
+ | |||
+ | |||
+ | =Problem 1= | ||
+ | |||
+ | * Write a python program called '''hw1a.py''' that uses a list of names, defined as follows: | ||
+ | |||
+ | dwarfNames = [ "Sleepy", "Sneezy", "Bashful", "Happy", "Grumpy", "Dopey", "Doc" ] | ||
+ | |||
+ | :and prints them with boxes around them. This time the boxes are all 20 characters in length. | ||
+ | |||
+ | +------------------+ | ||
+ | | Sleepy | | ||
+ | +------------------+ | ||
+ | |||
+ | +------------------+ | ||
+ | | Sneezy | | ||
+ | +------------------+ | ||
+ | |||
+ | etc... | ||
+ | |||
+ | * Note that there is one blank line printed between each box. | ||
+ | * Create a program that uses a main function, as we did in class on Tuesday. | ||
+ | * When you are done, transfer your program to your Linux 111a-xx account, and submit it as follows (more info on this in class on Thursday 9/15). | ||
+ | |||
+ | submit hw1 hw1a.py | ||
+ | |||
+ | |||
+ | =Problem #2= | ||
+ | |||
+ | |||
+ | submit | ||
+ | |||
+ | |||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | [[Category:CSC111]][[Category:Homework]] |
Revision as of 12:59, 13 September 2011
--D. Thiebaut 13:59, 13 September 2011 (EDT)
Contents
Problem 1
- Write a python program called hw1a.py that uses a list of names, defined as follows:
dwarfNames = [ "Sleepy", "Sneezy", "Bashful", "Happy", "Grumpy", "Dopey", "Doc" ]
- and prints them with boxes around them. This time the boxes are all 20 characters in length.
+------------------+ | Sleepy | +------------------+ +------------------+ | Sneezy | +------------------+ etc...
- Note that there is one blank line printed between each box.
- Create a program that uses a main function, as we did in class on Tuesday.
- When you are done, transfer your program to your Linux 111a-xx account, and submit it as follows (more info on this in class on Thursday 9/15).
submit hw1 hw1a.py
Problem #2
submit