Due: Thu, 30 Jan 2014, 10pm
80 pts, 8% of total grade.
Write a program, individually, to solve The 3n+1 Problem in Python:
For all projects, the minimum requirement for getting a non-zero grade is to write standard-compliant Python (2.7 or 3.2.3), to satisfy all of the requirements in the table below, including the precise naming of all the files, and to fill out the Google Form.
For this project, the additional minimum requirement for getting a non-zero grade is that Sphere accept your solution to 4073 (PYTH 2.7 or 3.2.3) and that you design and implement some form of cache to make it efficient.
You can earn 5 bonus pts, if Sphere accepts your solution to 4765 (PYTH 2.7 or 3.2.3).
Bonus pts will not increase the total score beyond the max score.
These are additional descriptions of the underlying math:
- Git Cheat Sheet
- Git Guide
- Git Guides
- Git Immersion
- Git Reference
- Google Python Style Guide
- Try GitHub
A private Git repository at GitHub, named cs327e-collatz, with the grader invited as collaborator and at least 5 commits, one for each bug or feature.
If you cannot describe your changes in a sentence, you are not committing often enough. Meaningful commit messages identifying the corresponding issue in the issue tracker (below). See here.
A log of the commits, named Collatz.log.
|2||5 pts||A GitHub issue tracker with an issue for each of the requirements in this table and at least 10 more issues, one for each bug or feature, both open and closed with a good description and a label.|
An average of at least 3 unit tests for each function, in the files TestCollatz.py and TestCollatz.out, that tests corner cases and failure cases.
A copy of your unit tests in the files <cs-username>-TestCollatz.py and <cs-username>-TestCollatz.out in the public test repo.
At least 1000 lines of acceptance tests, in the files RunCollatz.in and RunCollatz.out, that tests corner cases and failure cases.
A clone of the public test repo with a copy of your acceptance tests in the files <cs-username>-RunCollatz.in and <cs-username>-RunCollatz.out.
|5||20 pts||A standard-compliant Python (2.7 or 3.2.3) program in the file Collatz.py, with assertions that check pre-conditions, post-conditions, argument validity, and return-value validity, that runs as fast as possible and uses as little memory as possible.||Collatz.py|
HTML documentation in the file Collatz.html, that documents the interfaces to your functions.
Inline comments if you need to explain the why of a particular implementation.
A consistent coding convention with good variable names, good indentation, blank lines, and blank spaces.
|7||A file that combines Collatz.py and RunCollatz.py in the file SphereCollatz.py.||SphereCollatz.py|
|8||A make file in the file makefile.||makefile.cs327e.py|
|9||A ZIP file in the file Collatz.zip.||Collatz.zip|
|10||A submission to Turnin.|
|11||A Google Form.|
|Name||GitHub ID||GitHub Test Repository||Turnin ID||Turnin Project Folder||Google Form|
|Aizhuldyz Gabbassova||aizhuldyz||collatz-tests||aizhuli||cs327epj1||Google Form|
- Get an educational account with 5 private repos at GitHub.
- Create a private Git repository at GitHub, named cs327e-collatz.
- Add all of the requirements (above) to the issue tracker at GitHub.
- Clone your private Collatz repo onto your local directory.
- Invite the grader to your private Collatz repo.
- Confirm that the grader has invited you back to the public test repo.
- Clone the public test repo onto your local directory. It is critical that you clone the public test repo into a different directory than the one you're using for your private Collatz repo.
- Clone the public class repo onto your local directory. It is critical that you clone the public class repo into a different directory than the one you're using for your private Collatz repo.
- Copy the Collatz files from the clone of the public class repo to the clone of the private Collatz repo.
- Run RunCollatz.py and TestCollatz.py, confirm the expected failures, and add, commit, and push to the private Collatz repo.
- Write more unit tests in TestCollatz.py until you have an average of 3 tests for each function, confirm the expected failures, and add, commit, and push to the private Collatz repo.
- Implement and debug the simplest possible solution in collatz_eval() in Collatz.py until all tests pass and add, commit, and push to the private Collatz repo.
- Combine Collatz.py and RunCollatz.py into SphereCollatz.py (don't forget to remove import).
- Create an account on Sphere.
- Submit SphereCollatz.py to Sphere and confirm the likely result of time exceeded or wrong answer.
- Further debug the code, add the two quiz optimizations until it's accepted by Sphere, and add, commit, and push to the private Collatz repo.
- Create 1000 lines of acceptance tests and add, commit, and push to the private Collatz repo.
- Copy your unit tests and your acceptance tests to your clone of the public test repo, rename the files, do a git pull to synchronize your clone, and then add, commit and push to the public test repo.
- Implement and debug the simplest possible cache until all tests pass and add, commit, and push to the private Collatz repo.
- Submit and debug until accepted by Sphere and add, commit, and push to the private Collatz repo.
- Run pydoc on Collatz.py.
- Create a log of your commits.
- Create and submit the ZIP file to Turnin.
- Fill in the Google Form.
- It is your responsibility to protect your code from the rest of the students in the class. If your code gets out, you are as guilty as the recipient of academic dishonesty.
Submit a single ZIP file, named Collatz.zip, to the grader's Turnin account, with the following files, order doesn't matter: