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 trialGrayson Gitchell
6,893 PointsThe (text) part in the function. Can it be named anything or does it have to be named text? What does it do?
Can you do def yell(writing)? What happens if you leave the brackets blank?
1 Answer
Chris Freeman
Treehouse Moderator 68,441 PointsWhen defining a function, a collection of function parameters is place between the parens. These parameters will be assigned to point to their corresponding argument passed in during the function call. Both the arguments passed in, and the parameters receiving the arguments are merely pointers to objects. The parameter is only used within the function and maybe named any valid variable name since it is just another reference to the object. That is, the parameter name doesn't change the object it points to in any way.
def vaid_function(some_name_to_reference_first_argument_passed_in):
print(f"The first argument passed in is {some_name_to_reference_first_argument_passed_in}")
Post back if you need more help. Good luck
boi
14,242 Pointsboi
14,242 PointsThe questions you asked, how about give it a try at the workspace yourself. I'm sure you'll get the answers.