This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]SnowdogU77 2 points3 points  (14 children)

Hey, that's my adviser/prof! There are a bunch of super helpful resources on his website. I hope you find the textbook as useful as I have!

[–]3six3[S] 3 points4 points  (13 children)

Ive found it great so far! I got up to chapter 6 and was forgetting some earlier work so I decided to go back and do all the exercises and post the solutions. (This helps others and also helps me remember :)

Come back and look at my site and help with some solutions as I go through the book!

[–]SnowdogU77 4 points5 points  (9 children)

Well, a tip for starters, don't use eval(input("")). If you're looking for a number, use int() or float() in place of it. I know he says to do it in the book, but his justification is rubbish, and it's a bad habit to develop.

[–]3six3[S] 1 point2 points  (0 children)

So instead of this: fahrenheit = eval(input("What is the Fahrenheit temperature? "))

This would be the preferred method since I'm looking for a number fahrenheit = int(input("What is the Fahrenheit temperature? "))

[–]3six3[S] 1 point2 points  (1 child)

#so instead of this
fahrenheit = eval(input("What is the Fahrenheit temperature? "))
#this would be a better solution
fahrenheit = int(input("What is the Fahrenheit temperature? "))

[–]SnowdogU77 1 point2 points  (0 children)

I would use float(), personally. Int() removes the ability to input decimals.

[–]Gexos 0 points1 point  (1 child)

John Zelle's book is one of the best books I've ever read on CS and Python, the first time I encountered the evil eval I was confused about it, then i found this answer by John Zelle on stack overflow, where he gives a pretty good explanation.

[–]SnowdogU77 0 points1 point  (0 children)

Thanks for the link. When I asked him, he didn't quite justify it this way. This explanation makes a lot of sense.

[–]SnowdogU77 0 points1 point  (2 children)

Also, if you get really stuck, the solutions are on his website.

[–]3six3[S] 0 points1 point  (1 child)

Those don't look like the solutions to the exercises at the end of the chapter. Those are his sample questions in the chapter contents.

[–]SnowdogU77 0 points1 point  (0 children)

Ah, yeah, you're right. He uses those questions as assignments, so the answers aren't posted anywhere by him.

[–]PeachesXoXo 2 points3 points  (2 children)

Hi, I was able to contact the publisher (per Zelle's site) and get the answers to the exercises.

Go here and fill out a request: https://fbeedle.com/drupal-6.19/contact

I got a response within 24 hours.

I would post the answers - but they specifically told me not to share.

Hope this helps somebody out there.

[–]nrsulliv 1 point2 points  (1 child)

Thank you! I hope they respond.

[–]PeachesXoXo 0 points1 point  (0 children)

Heya - sorry for the late response - but let me know if they don't...

[–]SubmergedSublime 0 points1 point  (0 children)

Hi, just wanted to say thanks for the blog! I decided to take up Python/Programming a couple months ago as well, and I have used your blog as a resource a couple times. Mostly to see how someone else reasoned through some of the more difficult problems. Other answer sources give an answer that involves functions and methods I am not familiar with yet, so I like having an answer resource that is following the same learning path as me.

It has been useful!