Finish the material in chapter 5 in the text, on strings, lists, and files.
Review from Tuesday
'abcde'[2]
, 'abcdefghi'[3:7]
Remaining topics
list("one two three")
"one two three".split()
str(['a', 'b', 'c])
''.join(['a', 'b', 'c'])
Work through an example or two in class.
A certain CS professor gives 5-point quizzes that are graded on the scale
5-A, 4-B, 3-C, 2-D, 1-F, 0-F. Write a program that accepts a quiz score
as an input and prints out the corresponding grade.
rewrite the chaos program from chapter 1 in several ways :
(a) print the numbers in a nicely aligned table
(b) output the numbers to a file
(c) read the inputs from a file
Translate a lowercase word into its cipher, with each letter incremented by 1.
Aside: unix command line input/output redirection as an alternative way to do file input output
$ python yourprogram.py < input.txt > output.txt