Course Level
CS1
Collection Item Type
Assignment
Synopsis

ASCII Text Art is a loops/file I/O/strings/lists/dictionaries programming assignment for a CS0/CS1 course. For this assignment, students read in 26 text files, where each files stores ASCII art for a letter of the upper case alphabet. For example, A.txt stores ASCII art for the letter A, B.txt stores ASCII art for the letter B, and so on. The ASCII art for each letter is represented in the program as a list of strings, one string per line in the file. Collectively, all 26 lists are stored in a dictionary as letter (key) and list (value) pairs. Once loaded into the dictionary, the assignment requires students to modify the ASCII art by replacing characters. Lastly, the program prompts the user for a string of letters and the program writes the string to a file using the modified ASCII art.

Recommendations

Consider inviting someone from the art department to discuss how ASCII Art can be used in graphic design/visual arts (ASCII Art Islands: http://www.ascii-code.com/ascii-art/nature/islands.php), video games (Playscii: http://vectorpoem.com/playscii/), and animation (Star Wars ASCIImation: http://www.asciimation.co.nz/#) as a way to make Interdisciplinary Connections.

Experience level: Basic algebra and the listed CS topics are expected to complete this assignment. Students work independently on this assignment.

Engagement Highlights

This assignment is engaging because students work with ASCII art which is more visually appealing the plain character text. Also, students can play around with the ASCII art by making their own ASCII art letters or modifying the supplied letters. In this way, this material employs Meaningful and Relevant Content.

Engagement Practices Employed

Materials and Links

Computer Science Details

Programming Language
Python

Material Format and Licensing Information

Creative Commons License
CC BY-SA