CPSC120
Fundamentals of Computer Science

In-class Activity 29

  1. Create a Python program that prompts the user for the name of a ppm file and writes a new ppm file that is a grayscale version of the specified ppm file. A pixel can be made gray by averaging the red, green, and blue chanels.

  2. Create a Python program that prompts the user for the name of a ppm file and writes an new ppm file that is a blurry version of the specified ppm file. You can blur a pixel by averaging the a pixel with its neighboring pixels.