Quiz 1

10 minutes


Meet more students

First exploration wrap-up: Pythagorean triples

Goal was: Find lots of primitive triples and make a picture of them. See if there are patterns!

Rigorous square-testing

sqrt gives a "floating point" result, and is approximate

Better to generate a list (or even better, a set) of square integers and test candidates against that list.

New Python language feature list comprehensions

A concise way of setting up lists

Example: the square integers

Odds and evens

In the a and b of any Primitive Pythagorean triple, one must be even and one odd (prove).

Suggestion for clearer picture: put all evens on one axis and odds on the other. How to test for even?

Second exploration: prime numbers

Brute force algorithm

Sieve of Eratothenes: eliminate all integer multiples of each integer.

Primes seem somewhat random. Is their density increasing/decreasing?

Third exploration: "crime" numbers

Def: A positive integer n > 1 is a "crime" number if b**n = b (mod n) for all integers b, 1 < b < n.

Try 4, 5.

A few more trials

Is the definition of "crime" numbers somehow equivalent to the definition of prime numbers?


Excerpt from Rahul Kayshap's guide: *The reports are your opportunity to tell a compelling story. When I read your report, I will look for your understanding, coverage and presentation of results. So submitting project reports is not about merely carrying out the tasks laid out in the problem statements. I expect you to use those as a springboard to begin your explorations and study in depth. When you finally report your results, it must laid out in a complete, coherent and engaging manner. For instance, introduce the problem. Introduce the concepts you are exploring. Introduce some background, history, importance etc. Even if we have studied some of these concepts or definitions in class, introduce them in your own words. Every aspect of the problem you have explored must be properly defined, identified and explained. Also, please don't copy paste stuff into your reports. Clearly split up your report into sections and introduce the objective of each section, lay out the problem etc. Your report should end with a conclusions section, followed by a list of references you have used. These references should also be cited throughout the notebook wherever you have used them. *

System Message: WARNING/2 (day03_outline.rst, line 67); backlink

Inline emphasis start-string without end-string.


Here is a detailed <Report Guide