Intro to
Programming
(with Python)

Fall 2018
course
site

Thu Sep 20

Finish the material in chapter 5 in the text, on strings, lists, and files.

Review from Tuesday

Remaining topics

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
https://cs.marlboro.college /cours /fall2018 /python /notes /chap5b
last modified Sat November 23 2024 10:57 am