MCS 260 Intro to Computer Science Spring 2022
Project 4Due Friday, April 29 by 11:59pm
For this last project you will create a project of your own choosing!
1 General requirements
1.1 Must use course topics.
Your project must be designed to involve some of the topics from MCS 260, and a list of such topics mustbe included with your proposal.
1.2 Must be testable.
With manual testing of many student projects by a single instructor, it is important that the process oftesting of your project is straightforward and clearly explained. Testing must not involve the creationof custom data files or other time-consuming preliminary steps. If your program requires these, sampleinput files should be included with your submission.
1.3 Must be documented.
The next section describes requirements for the source code of your project. In addition to those require-ments, your project must include a file README.txt that describes the project in at least as much detailas the proposal, and which documents how it should be tested. This last point is extremely important:
If README.txt is missing, or if I read README.txt and cannot figure out how to use yourprogram rather quickly, there will be a significant grading penalty.
A good litmus test for whether your README.txt is good would be: If you gave your project to someoneelse in the course, could they figure out how to use it just by reading README.txt? It would be a goodidea to actually try this! (Unlike previous projects where everyone was working on a similar task, in thiscase, asking someone else to try your program is acceptable.)
It is acceptable to include additional documentation, such as a tutorial or reference manual.You must be the sole author of the documentation. It should not consist primarily of quotations from
other sources, and any quotations present should be cited.
1.4 Must not depend on special characteristics of your computer.
It must be possible to test your project on any platform (Windows/Mac/Linux). The program’s operationmust not depend on any system-specific details such as the exact operating system version, the user name,or the name of the directory in which the program is run.
1.5 Must only modify files in current directory.
Your program must not alter or write any files outside of the current working directory when the programis run, unless a filename is provided as input to your program that specifies another location.
1.6 No external modules without approval.
Your program may not import any modules other than those included with the Python standard libraryunless this is indicated in your proposal and approved.
University of Illinois at Chicago page 1
MCS 260 Intro to Computer Science Spring 2022
1.7 Not a standard exercise.
Some programming projects (e.g. write a tic-tac-toe game) are so often assigned in introductory coursesthat hundreds of solutions and lots of related discussion can be found online. If you propose one ofthese “standard” topics, you will be asked to choose another topic or revise your proposal significantly.Basically, if an idea shows up prominently in a web search for something like “Python beginner projectideas”, it will probably not be acceptable.
1.8 Limited overlap with other students.
If your proposal is substantially similar to that of another student in MCS 260 who submitted theirproposal before you submitted yours, you will be asked to make changes. The goal is for each student tohave a unique project topic.
Note that many of the sample topics listed below allow for many different proposals to be derivedfrom them, depending on how you fill in the details.
1.9 Limited file size.
The total size of the submission to Gradescope must not exceed 10MiB. If there are larger data filesrelevant to your project, they should be publicly available on the internet, and you should includeinstructions for how to obtain them in the project documentation.
1.10 We allow mostly-documentation projects focused on a new topic.
You can propose a project that focuses primarily on learning a new topic in Python programming, forexample, a module from the standard library that we don’t cover in MCS 260. If this is your plan, youshould indicate this in the proposal form, and when you submit your project it should include:
� A description in about 300-500 words of what you learned about the module/feature in README.txt.
� A text file EXERCISES.txt that contains at least three programming exercises that would be ap-propriate to assign to someone learning this topic.
� A main program solutions.py that contains solutions to the exercises in a form that allows all ofthem to be run, and which reports on the results by printing to the terminal.
2 Source code specification
This section describes how your program must be written and submitted.Your submission must contain a README.txt file meeting the requirements of subsection 1.3.Your submission must contain at least one Python source file. All Python source files in your project
must have the extension .py.You may choose the name of your main program, and of any modules you create in the project.Each Python source file you submit must begin with a standard header, which consists of a file-level
docstring followed by:
� The following comment line, verbatim: # MCS 260 Spring 2022 Project 4
� A comment line consisting of your full name
� A comment line beginning with # Declaration:, and then containing a full sentence that says,in your own words, that you are the sole author of the program you are submitting and that youfollowed the rules from the course syllabus in preparing it. (This part can span multiple lines.)
University of Illinois at Chicago page 2
MCS 260 Intro to Computer Science Spring 2022
Here is an example of an acceptable start of a source file for a project submitted by a student named Srinivasa Ramanujan:
"""Virtual machine that runs 6502 assembly code"""# MCS 260 Spring 2022 Project 4# Srinivasa Ramanujan# Declaration: I, Srinivasa Ramanujan, am the sole author of this code, which# was developed in accordance with the rules in the course syllabus.
Your source code will be evaluated on the basis of readability. You are expected to use descriptive variable names for the most important variables (e.g. credit as opposed to c). Single-letter names are permissible for the variable of a for loop.
Comments should be included whenever the intent of a line is not immediately apparent. Comments on every line would be excessive, but it is expected that this project will require many descriptive comments. Judging the correct comment density involves an element of subjectivity. If you are unsure about whether your code has enough comments, just ask. (You can ask about this by submitting your code to Gradescope and then emailing the instructor, or by including source code directly in an email to the instructor.)
Every comment in the source files you submit should consist of explanatory text. Do not use comments to disable code that isn’t used; instead, remove such code before submitting.
In the review of your source code, my ability to understand the way your code works is important. It is theoretically possible to write an extremely complicated program that performs a simple task correctly but which is impossible for a human to understand. In the code review scoring, code that is very difficult to understand may be subject to a penalty. If you are unsure about the level of understandability of your code, ask.
3 No collaboration or use of external resourcesAs with every other project in MCS 260, Project 4 is subject to the rules set out in the syllabus. This means that any program you propose to create for Project 4 must be entirely your own work, and you must not give or accept assistance of any kind except from course staff. In particular, using code adapted from online resources is forbidden. It is acceptable to use books and online resources to learn new skills and techniques in this project, especially if you propose a project involving topics not covered in MCS 260. Learning how to do something is quite different from finding code that does something and pasting it into your project, and these are generally easy to distinguish when reviewing submissions. But if you are at all unsure about whether a certain way of using a resource is permitted or not, ask before proceeding.
Violations of the rules in the MCS 260 syllabus will be referred to the Dean of Students office for disciplinary proceedings.
4 Project seedsHere is a list of some “seeds” for projects that you could expand and develop into a proposal. You are free (and encouraged!) to pursue ideas not on this list. You are also free to modify any aspect of one of these ideas when you create your proposal (as long as it meets the rules in section 1).
1. Recipe multiplier / unit converter — A program that reads the ingredients for a cooking recipefrom a text file, with lines like "11 oz powdered bhut jolokia chilies" or "1.5 c butter"and then, upon request, does any of these things: (1) Convert from US/imperial units (cup, ounce,pound,…) to metric units (ml, g, …), (2) Convert from metric to US/imperial units, (3) Multiplythe recipe quantities by a given float (e.g. double or halve).
University of Illinois at Chicago page 3
MCS 260 Intro to Computer Science Spring 2022
2. Interactive fiction — A game based on keyboard input that prints a description of your currentlocation and lets you type commands like “north” to walk north, “get laser” to pick up an objectcalled “laser”, “open tank” to release the sharks, etc.. It should be possible to win the game byachieving a certain objective, such as reaching a specified location, finding a specified object, orsomething else.
3. Filing system — A program to catalog a collection (e.g. of books), storing its data in a file(e.g. CSV). The program would use a keyboard interface and offer commands to locate (search),print, modify, and delete records. The search command should allow searching for text containedin a specified field, e.g. find all books whose title contains “shark”.
4. Expanded text to HTML — A utility to convert text to HTML.
5. Todo list — A program that maintains a list of tasks with optional due dates. It can display tasksin the order added, or in order of how soon they are due. It supports adding or removing tasks, orchanging the deadline for a task. The task list is stored in a file. (The handling of dates and timesin this project will be one of the trickier parts.)
6. Open data analysis — Use public data sets from a source such as the Chicago Data Portal, theIllinois Data Portal, data.gov, or a federal agency. Write programs to extract useful informationfrom these data sets and display or save it in a convenient format. Document exactly where youdownloaded the datasets, and what commands are used to process each one. Example: List thestreet names of Chicago in order of decreasing numbers of parking tickets issued in 2018. Documentwhat you learned from your analysis of the data.
7. Random text — The program accepts an input text file which should be a very large documentwritten in a natural language (e.g. English). A novel from Project Gutenberg would be a goodstart. It then produces a bunch of “random” text where the likelihood of any two words appearingnext to each other is similar to the input file (but where the actual words are selected randomly).This output text will be meaningless, but at a quick glance it might look like real prose. (Thisproject requires some learning or knowledge of probability and statistics.)
8. Python source stats — A program that reads a single Python source file and prints some statisticsabout the contents, including the number of lines that are not blank and not entirely comments(true “source lines”), the number of function definitions, number of function calls, the average andmaximum line length, etc.. You could use the regular expression module to search for functiondefinitions, or learn about parsing Python source in Python using the ast module.
9. Simple spell checker — Find and use a public domain English word list to make a simple spellchecker. It should read a given text file (whose name is a command line argument) and print anylines that appear to contain misspelled words. It will then prompt the user to type a replacementword, or let them press Enter to keep the current spelling. The result should be written to a new file.Work to make the program smart about detecting what a ”word” is, so that it ignores punctuationand mathematical expressions.
10. Find large files — Recursively search through a directory specified on the command line for filesand then print a list of all files found in order of increasing size. For each one, also indicate apercentage of the total size of all files found that it accounts for. Also report on all the directoriesfound in the search, indicating the total size of each directory’s contents (the sum of sizes of allfiles it contains), with directories listed in order of increasing size. Also allow the user to specify aminimum size (e.g. as a second command line argument) so that no items smaller than this thesholdare printed. Read about os.stat() to learn how to get the size of a file.
University of Illinois at Chicago page 4
MCS 260 Intro to Computer Science Spring 2022
11. Chase simulation — Create a program that can simulate two types of robots that move on a30x30 square grid. Chaser robots can move one square in each time step. A single Target robotcan move two squares in each time step. Each Chaser knows the location of the Target robot.The Target robot knows the location of all the Chasers. Program each robot type with a strategyto either seek the Target robot (for Chasers) or to evade Chasers (for the Target). When run,the program shows a diagram of the current state by printing a grid of characters to the screen.Pressing Enter advances time and prints the new state. The simulation ends if the Target is caughtby a Chaser.
12. Language flashcards — A program for learning vocabulary in another language that reads auser-supplied data file of corresponding word pairs (with lines like “Frühstück=breakfast”) andthen selects words at random to ask the user to translate. The user’s success rate on each wordis tracked and saved to a file. The random word selection should not use a uniform distribution.Instead, it should favor words the user previously got wrong and de-emphasize words the user hasa high success rate with.
13. Net present value calculator — Build a tool for analyzing projected profit/loss data for acompany taking into account inflation. On the command line, the user provides an input file nameand a list of estimated rates of inflation for the next few years. The file should contain a list ofestimated profits (positive numbers) or losses (negative numbers), with each line correspondingto one year. The program then computes and prints the net present value of the income stream.(Note: Requires knowledge or learning of the concept of net present value!)
14. Personal expense tracker — A simple program for tracking personal income and expenses. Itstores data in a JSON file, and when run prompts the user for commands. Commands can specifyspending (with amount, category, and optional date) or income to be recorded, or can ask for asummary of spending and income for the last month, year, or other time period. Such a summarywould indicate spending in each category and total spending, each in absolute numbers and as afraction of income for the same period. (Note: Handling dates/times will be a tricky part of thisproject.)
15. Fake code typist — A program that lets an actor who doesn’t know Python appear to be typingPython code in the terminal for cinematic purposes. First, learn how to detect individual key pressesin the terminal in Windows or Linux. Then, make a program that will allow the user to type garbagetext (random letters) on the keyboard and have nice Python source code show up on the screen.One character of source code should appear for each key pressed. The code displayed should comefrom some pre-loaded sample code files that are written by you, are provided as examples in MCS260, or are in the public domain.
16. Location guessing game — A one-player game displays a grid using text printed to the terminal.Each square in the grid might contain an obstacle (a sinkhole, an enemy, etc.) and the user isallowed to test locations by entering coordinates. The game provides some feedback about eachguess, such as the distance to an obstacle, the number of nearby obstacles, or something else. Thenext time the grid is printed, it also reflects what the player has learned about the contents ofthe grid squares. You can determine the best win/loss logic, based on what turns out to be fun;examples: (1) Must locate an obstacle within a fixed number of moves to win; (2) Must avoid allobstacles and find all other squares to win; (3) After a limited number of moves, the number ofobstacles found is the score.
17. Text to LATEX — This project is suitable for students who know (or want to learn) the LATEXdocument preparation language. It consists of a program that converts text to LATEX with supportfor variable substitution, comments, and bullet lists.
University of Illinois at Chicago page 5
MCS 260 Intro to Computer Science Spring 2022
18. Javascript Obfuscator — This is for students who know or want to learn Javascript. Thisprogram will take a Javascript file and convert variable names and user-created code into randomstrings in an attempt to make the code less readable to a client. It will make sure the random stringnames are all valid in Javascript and properly changed in all locations.
19. Nerdle game aid — Similar to Project 3 where we created a Tkinter GUI to aid a user in solvingthe daily Wordle, you can create a Tkinter GUI to aid a user in solving the daily Nerdle.
5 Factors considered in review
This section describes the main factors that will influence how your project is graded.
5.1 Can I figure out what to do?
By reading README.txt, can I easily determine how to use your program and what it does?
5.2 Does it work?
Does the program do what is promised in the documentation?
5.3 Does it follow the rules?
section 1 and section 2 contain a number of rules that apply to this assignment. A submission thatviolates any of these rules will not receive full credit.
5.4 Topic coverage (and bonus)
A project that uses a lot of concepts from the course, especially ones covered after the due date of Project2, will be viewed favorably. This means that the rest of the project doesn’t need to be as complex orpolished to earn full credit.
At a minimum, the project must use the concepts in the approved proposal in order to get full credit.
5.5 Source readability
Is the source code well-organized, with descriptive variable names, comments, and a docstring for everyfile, class, and function?
5.6 Documentation readability
Is the documentation written in full sentences? Does it make sense, and give a useful summary of whatthe project is about and how the included Python code can be used?
5.7 Extra documentation bonus
As mentioned earlier, some projects may focus primarily on documentation and exercises about a topicwe didn’t cover in MCS 260.
But for other projects that focus on writing a program, if the project includes a lot of high-qualitydocumentation (beyond just the basic README.txt that is required), then I will allow the rest of theproject to be less complex and still earn full credit.
University of Illinois at Chicago page 6
MCS 260 Intro to Computer Science Spring 2022
5.8 Use of advanced features bonus
There are certain concepts in MCS 260 that beginners sometimes shy away from. If you use theseextensively, then I will allow the rest of the project to be less complex or less polished and still earn fullcredit.
Making extensive and effective use of these concepts will have a large effect:
� Object-oriented programming
� Organization into modules
� Tests included with the source (e.g. using pytest)
Making extensive and effective use of these concepts will have a moderate effect:
� Regular expressions
� List and dictionary comprehensions
5.9 Originality bonus
A project idea that is not based on one of the suggestions in this document, and not similar to a standardprogramming example, will be rewarded by allowing the rest of the project to be less complex and stillearn full credit.
5.10 Resuable module bonus
A project that includes a module containing at least 4 functions that, as a group, seem like they wouldprobably be useful in other programs will be rewarded by allowing the rest of the project to be lesscomplex and still earn full credit.
5.11 Proposal Due Date and Grading
While the final project submission is due on April 29, your proposal is due by April 11 at 11:59pm. Youwill submit your proposal using the Google form posted in Blackboard. The proposal itself is worth10% of your project 4 grade. It does not have to be long, but it should at minimum describe the basicideas/tasks, the MCS 260 topics it will cover, any modules it might use, and roughly how you think youcan get it to work. This proposal must be approved by me before the end of the day on April 11 toearn the 10%. Therefore, it is highly recommended that you don’t wait until April 11 to submit yourproposal in case changes are necessary.
University of Illinois at Chicago page 7