Functions in Python—easy or hard to learn & master?

This week I’ll be looking at aspects of functions which can be tricky for those who know basics and want to move to next level. If you’ve learnt about functions in Python are keen to take the next step, then hopefully this series of toots will help…

Let’s start with the unexciting but important—terms

define
call
parameter
argument

Here’s the code we’ll use as an example which you can also get from the ALT text of the image in this toot:

def greet_person(person):
print(f"Hello {person}! How are you doing today?")

greet_person("Ishaan")
greet_person("Elizabeth")

You can follow this thread in the replies (unlisted)

/1

@folkerschamel redefining print() could be one way. Redefining __add__() another, there are probably more…

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.