Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jazmin T
Courses Plus Student 234 PointsShould we take notes on
Ok so Craig liikes to explain things the "long way," and then shows us what we can do to make things much more simple & short... so, for taking notes should we just "skip" to the short and simple version? Its a little annoying :[ * I am watching the entire thing once, the second is for notes, and the third is for practicing... So hence why I would want to skip.
5 Answers
Jazmin T
Courses Plus Student 234 PointsI then find myself forgetting everything though, do you go back and study every part until its drilled in your head?
Jazmin T
Courses Plus Student 234 Points*study = write the code over and over (For you)
Dave StSomeWhere
19,870 PointsCoding each part is what drills it into my head - I make sure it runs locally and I look up whatever is fuzzy. So, debugging my code, to me is the best way of learning. So, instead of worrying about the video, I'm looking up the commands in the manual and checking out examples on stack overflow and am more concerned in being able to utilize the manual and searches as opposed to taking my own notes. Applying DRY - it's all out there and debugging is the only way I can really know what's happening. Hope that ramble makes a little sense.
Jazmin T
Courses Plus Student 234 PointsSo you even code what Craig shows as an example first then? Where did you find a manual? Thank you for being patient with me... I apreciate your time.
Dave StSomeWhere
19,870 PointsYes - if you want to be able to code, then code. I saw your other question on the square function... so let's use that as an example. First, you should have your local environment setup so you can run python code, can you do that? If I'm not sure how to define a function, I do a search on "python how to define function" and check out some of the results (and find out other good stuff along the way) - the first one was https://www.w3schools.com/python/python_functions.asp
Now you also need to pay attention to the requirements - what they are asking for - that asked you to define a function that accepts a parameter named number - so, I would code locally
def function_name(parameter):
# or for this item
def square(number):
For the manual - you can search for python manual or here you go - https://docs.python.org/3/
Jazmin T
Courses Plus Student 234 PointsOkay I see, so then after I practice with the "long ways" (Writing out that code) that Craig shows, redo over and over the shorter version? I just don't want to confuse myself. Do you think that might help? & local environment. hmm do you mean the python we download from python.org? (currently I'm using the workspace & the task challenge (quiz) windows) So, I tried inputting what you said and got an error : invalid syntax with it pointing to the : (then I deleted that and still received the error on the parenthesis) I try google, I guess I just haven't found an answer that makes sense. because it includes math.. I've seen some answers with import math at the beginning. So that leaves me lost also on the format. ( another question how do you insert a screen shot and why is everyone's screen shot on here a black type of layout?) * Thanks for the links I wish I could repay you! I feel so lost over here.
Dave StSomeWhere
19,870 PointsGlad you figured it out...
What you are seeing are code blocks not screenshots - click the Markdown Cheatsheet below for how to
I think most important is your local dev environment (there are courses/workshops that cover them). While the workspaces are a great feature and nice for back up, I rarely use them. It will be well worth your effort to up and running yourself. Stumbling through the process will be quite valuable. There are so many options (paid and free) that it would be impossible for Treehouse to cover them for everybody. So, they have workspaces that work the same for all, but creating your own workspace at home is what you need to do. Just ask for help. I would start by checking out things like Atom, Sublime, Eclipse, PyCharm (python) to name a few...
Jazmin T
Courses Plus Student 234 Pointsdef square (number): return square (number * number)
So far the first part is correct and the second line I'm getting an error that my math is wrong lol so close!
Jazmin T
Courses Plus Student 234 PointsITS MOTHER EFFIN
def square(number): value = number * number return(value)
gosh I feel so D: but whatever I found it & did it! thanks for all your help!
Dave StSomeWhere
19,870 PointsDave StSomeWhere
19,870 PointsWe all have to find the way that works best for us individually. For me, I don't see any value in "taking notes" - just copying the teachers notes from the bottom seems to provide the reference material for that topic. I find that coding along during the video (stopping and starting) and doing searches on the various commands helps me retain the material. Then, I guess my code could/would be considered notes. This seems to work best for me