You created “def my_function():” but then you called my_func(), but you should have called my_function(), since my_func() will call another function “def my_funct():” which wasn’t defined yet. This might be confusing to a beginner. I hope this is clear to everyone. Great course so far!
Arguments are used in between the parenthesis in the “def” header {e.g. def my_function(arg1, arg2)}, but Parameters are used in between the parenthesis when calling the function {e.g. my_function(param1, param2)}.
Thanks for the comments Peter! I had noticed the error in the slide when we released the video, and Dan put up the fixed version, calling the correct my_function()
. It somehow reverted back, but should be fixed again.
On the arguments vs parameters, I do see a mix of both used when explaining them, example here on python.org: docs.python.org/3/tutorial/controlflow.html#defining-functions
I agree that the use case you have is solid.
Great tutorial. What is the name of the Terminal you use.
Thanks so much! I’m using Bpython as a REPL (Read, Eval, Print, Loop) tool inside of Visual Studio Code.
Become a Member to join the conversation.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4