air bubbles are trapped within the stem and root network of a frozen houseplant
techred home > python 2 sequence > icon manipulatiopn

Personality icon manipulation


Sample icons from CIT-115
Sample looping script from class (in process)
Sample output
Phase 1: Basic icon printing
Phase 2: Peer analysis


wb_incandescentPhase 1 specs

This first phase involves creating a working prototype of a program which can read in data about a 10x10 icon with a bit depth of 1 (on/off, black/white) and display it to the user via a simple character-based output. Students with interest can implement functions to manipulate the icons.


Create a program in python that uses looping and basic data structures to display customized 10x10 student icons in various scales and orientations.

program requirement 1: basic display

Create a data structure (list, tuple, dictionary) that can represent the sequence of on and off cells in each icon inside your python program

program requirement 2: display

Read your custom data structure to display a visual representation of your icon using a single symbol, such as an asterisk or an at-sign.

program requirement 3: manipulation

Implement one or more transformations on a given icon, starting with scaling, such that each "cell" is represented by not just one character, but a square of characters of a given size. Consider other transformations such as inverting on and off cells, or rotating by a specified amount of degrees

program requirement 4: functionalization

Review your code and break it up into as many sensible functions as possible, allowing for code re-use. Comment each function such that its purpose is clear to other users.

program requirement 5: sharing

Post your code on your github account and make sure your git account is linked in our shared tracker

Sample output

icon sample

wb_incandescentPhase 2: Peer analysis

With your specs from phase 1 complete, you should now have a working program to share with your peers on github. With your instructor, choose a peer's project to review and carry out the following analytic steps:

  1. Read your peer's code carefully and create a functional flow diagram either on paper or on a mini white board. Include the function name and a brief phrase discussing its purpose in the tool chain.
  2. Populate the table below this numbered list with metrics relating to your peer's code as you proceed through these steps, starting with basic counts of number of lines and number of functions along with the average length per function
  3. Adjustment A: The raw data for each icon from CIT-115 students happens to be encoded in a series of 100 characters such that a 'P' means there is coloring present in a given cell, and an 'N' means there is no coloring present. What do you believe would be the minimum changes required to undetake this change?
  4. Adjustment B: In a strange turn of events, a printer that Eric works with has agreed to print the icons onto T-shirts but they must be rectangular and not square to maximize the use of the screen printer. The code must now adjust the aspect ratio of the inputted icons by "chopping" off the left and right columns, leaving the matrix 8 cells wide by 10 cells tall.
Metric Measure Notes
Number of lines (roughly subtracting white space)
Count of functions
Average lines per function
List and count of transformations attempted
List and count of transformations successful
Percent of functions to change for adjustment A
Percent of functions to change for adjustment B