Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 3.42 KB

recreational_math.md

File metadata and controls

43 lines (31 loc) · 3.42 KB

CSCI 39538: Homework 2: Recreational Math Spec Due: 3/24/22

This assignment has multiple parts and is a group project. You will be split into groups on 3/7/22 and it is recommended that you come into class. This assingment is also not the standard kind of assignment you would see in a college class.

Recreational math is mathematics that is done for fun. Most of you might think that such a thing should not exist. But it does, and it could actually be quite fun.

You can see a lot of examples from links on the recrational math wikipedia.

Here is the goal of this project, to learn about code review and how to spot errors in code. Each group will be a team of ~3 people. Each team mate will choose a unique recreational math problem like:

  • The Collatz Conjecture
  • Generating Prime Numbers
  • Generating Perfect Numbers
  • Generating Kaprekar Numbers (check out the Kaprekar Constant)
  • Finding palindromic patterns like with the number 1089
  • Armstrong Numbers or narcissistic numbers
  • Amicable Numbers
  • And a bunch of other recreational math topics (fractals for example)!

And here is the interesting part (which can be very difficult). Your goal is to add implicit errors into your code. Implicit errors are (non pythonic 😉) errors which aren't always obvious and oftentimes end with the program running but the solution being incorrect. You'll likely need to use logic errors or errors that only show up when an edge case is requested by a user.

Then submit your code to a repository that your team will fork from my github for this assignment. Each team will write their code into a folder they make with their group number. Once your code is submitted, the team will meet and run a code review for each code submission. The goal of the code review is to catch the implicit errors and to correct any other errors found.

Finally, the team will work together to generate a docstring which will explain what the code is attempting to do and a little blurb about the actual problem (from the math perspective ie who discovered it, why and what significance if any it might have).

Summary:

The grade for this assignment is out of 20.

  • (5/20 points) Write code to attempt to solve a recreational math problem. Choose one that already has a solution
  • Note: while finding an algorithm online is fine, do not copy code from an online source
  • (5/20 points) Inject implicit errors into your code
  • (5/20 points) Run a code review to discover these errors. You cannot give away the errors, your teammates must discover them
  • (5/20 points) Write a docstring with your team outlining what the code does
  • Note: code review can also be used to find a more optimal solution to a problem
  • Note: besides submitting your code, you also need to submit a doc showing what errors you injected and how those errors aren't immediately obvious (ie obvious runtime errors don't count)
  • Note: try to have fun! This is an experiment and it would be good to know how to improve this assignment! Let me know your thoughts at the end!

Extra credit will be awarded for more ambitious math problems tackled and for creative errors that arise from the problem chosen (like finding an incorrect Colletz Conjecture solution 😆).