Skip to content

Adding session02 homework#12

Merged
PythonCHB merged 13 commits intoUWPCE-PythonCert:masterfrom
meshmote:master
Oct 13, 2014
Merged

Adding session02 homework#12
PythonCHB merged 13 commits intoUWPCE-PythonCert:masterfrom
meshmote:master

Conversation

@meshmote
Copy link

Pull request is from master because I tried out the merge function, then kept doing session02 homework in the newly merged master. I'll keep the next HW on a session03 branch. Can't keep this stuff straight. :-)

Thanks!
Robert

@PythonCHB
Copy link
Contributor

No problem with the branches -- and If I can keep up with you, it's not a big deal to use branches for this anyway...

-Chris

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! where did you find that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the HW instructions said to go up to m=4, n=4 on the table in the
Wikipedia article, so I started out with an assert statement for each cell
in the table (the table gave the higher order answers as powers of two).
The max recursion depth error message was thrown by the interpreter on the
first run, so I just commented them out one by one till it stopped
complaining.

On Sun, Oct 12, 2014 at 9:27 PM, Christopher H.Barker, PhD <
notifications@github.com> wrote:

In Students/RPerkins/session02/ack.py:

  • assert ack(1, 1) == 3
  • assert ack(1, 2) == 4
  • assert ack(1, 3) == 5
  • assert ack(1, 4) == 6
  • assert ack(2, 0) == 3
  • assert ack(2, 1) == 5
  • assert ack(2, 2) == 7
  • assert ack(2, 3) == 9
  • assert ack(2, 4) == 11
  • assert ack(3, 0) == 5
  • assert ack(3, 1) == 13
  • assert ack(3, 2) == 29
  • assert ack(3, 3) == 61
  • assert ack(3, 4) == 125
  • max recursion depth exceeded after this point

  • #assert ack(4, 0) == 222-3

nice! where did you find that?


Reply to this email directly or view it on GitHub
https://github.com/UWPCE-PythonCert/IntroToPython/pull/12/files#r18753604
.

Robert Perkins
Mobile: 425-239-9269
Email: meshmote@gmail.com
Professional Profile
http://www.linkedin.com/pub/robert-perkins/9/a6a/a91

http://maps.google.com/maps?q=&hl=en
See who we know in common
http://www.linkedin.com/e/wwk/29505421/?hs=false&tok=0zCreXIp0dhRQ1Want a
signature like this?
http://www.linkedin.com/e/sig/29505421/?hs=false&tok=1-_hPrm6YdhRQ1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Sun, Oct 12, 2014 at 9:36 PM, Robert Perkins notifications@github.com
wrote:

I thought the HW instructions said to go up to m=4, n=4 on the table in
the Wikipedia article,

yup -- I wanted you to hit that recursion error... :-)

so I started out with an assert statement for each cell in the table (the
table gave the higher order answers as powers of two).

ahh -- I had forgotten those where there.

Nice job.

-Chris

Christopher Barker, PhD

Python Language Consulting

  • Teaching
  • Scientific Software Development
  • Desktop GUI and Web Development
  • wxPython, numpy, scipy, Cython

PythonCHB added a commit that referenced this pull request Oct 13, 2014
Adding session02 homework

Looking good!
@PythonCHB PythonCHB merged commit 2a80b6f into UWPCE-PythonCert:master Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants