-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pascals-triangle: split into instructions and introduction #2449
Conversation
@@ -0,0 +1,3 @@ | |||
# Instructions | |||
|
|||
Your task is to output the first N rows of Pascal's Triangle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need more here? Some examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example explicitly showing the addition process like in https://en.wikipedia.org/wiki/Pascal%27s_triangle#/media/File:PascalTriangleAnimated2.gif might be handy. I think that's where students might get stuck. Once you've got over that, I don't think additional examples provide a lot of extra insight. The modeled triangle doesn't change, just the number of rows exported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't come up with a story here. I'm open to suggestions :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh, I didn't even know you could comment on files, TIL.
Pascal's Triangle is a classic: here are some stuff you can do with it, maybe inspiration will strike:
- You can draw a Sierpinski triangle by coloring the even/odd numbers
- the sum of each row is a power of 2
- each element is a combination, entry k in row n tells you how many ways you can pick k elements from n
- squishing all the numbers in a row gives you a power of 11 (1331 = 11^3, 14641 = 11^4)
It's all a bit nerdy, but that can be a good thing :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the third one is most suitable for a story. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had no idea there were so many things you could do with it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, there's more, there are so many patterns in these numbers. Fibonacci numbers are also hiding in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much more!
-
An especially accessible list of patterns: Pascal's Triangle @ MathIsFun. Possibly interesting exercise: spot the duplicates. Most of the patterns listed here are really the very same pattern, just phrased in different ways.
-
Skim the images in the Wikipedia article for hints at more patterns, elaborated on in the text.
@@ -0,0 +1,3 @@ | |||
# Instructions | |||
|
|||
Your task is to output the first N rows of Pascal's Triangle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example explicitly showing the addition process like in https://en.wikipedia.org/wiki/Pascal%27s_triangle#/media/File:PascalTriangleAnimated2.gif might be handy. I think that's where students might get stuck. Once you've got over that, I don't think additional examples provide a lot of extra insight. The modeled triangle doesn't change, just the number of rows exported.
Co-authored-by: András B Nagy <[email protected]>
@BNAndras I've added a bit more text, but so far struggled to visually and textually explain the logic. I'm open to suggestions. |
I've added a story and updated the instructions. |
Co-authored-by: BethanyG <[email protected]>
Co-authored-by: BethanyG <[email protected]>
Co-authored-by: Jie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing about the "math is boring" part, I found this on line 3:
With the weather being great, you're not looking forward to spending an hour in a classroom doing math.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style consistency for "single sentence per line" regarding a link given, the change will match the link on line 15 (prior to change being made).
Broke up the long line with the colon being a separator. While a single sentence, this is a reasonable exception to the strict "one sentence per line" and still supports the reason why we have that style adopted, I think.
|
||
With the weather being great, you're not looking forward to spending an hour in a classroom doing math. | ||
Annoyed, you enter the class room, where you notice a strangely satisfying triangle shape on the blackboard. | ||
Whilst waiting for your math teacher to arrive, you can't help but notice some patterns in the triangle: the outer values are all ones, each subsequent row has one more value than its previous row and the triangle is symmetrical. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whilst waiting for your math teacher to arrive, you can't help but notice some patterns in the triangle: the outer values are all ones, each subsequent row has one more value than its previous row and the triangle is symmetrical. | |
Whilst waiting for your math teacher to arrive, you can't help but notice some patterns in the triangle: | |
the outer values are all ones, each subsequent row has one more value than its previous row and the triangle is symmetrical. |
I personally thought that this was fine, because one can enjoy math but still enjoy great weather more. |
Co-authored-by: Victor Goff <[email protected]>
I've updated! |
No description provided.