Exercise 9: Printing, Printing, Printing

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Here's some new strange stuff, remember type it exactly.

days = "Mon Tue Wed Thu Fri Sat Sun"
months = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug"

print "Here are the days: ", days
print "Here are the months: ", months

print """
There's something going on here.
With the three double-quotes.
We'll be able to type as much as we like.
"""

What You Should See

$ python ex9.py
Here's the days:  Mon Tue Wed Thu Fri Sat Sun
Here's the months:  Jan
Feb
Mar
Apr
May
Jun
Jul
Aug

There's something going on here.
With the three double-quotes.
We'll be able to type as much as we like.

$

Extra Credit

  1. Do your checks of your work, write down your mistakes, try not to make them on the next exercise.

Table Of Contents

Previous topic

Exercise 8: Printing, Printing

Next topic

Exercise 10: What Was That?

This Page