Foundations of Python

You are currently auditing this course.
38 / 134

Functions

A function is basically a sequence of statements that collectively perform some task or a group of tasks.

  • We call a function by its name.

We have already encountered certain functions like,

type(23)

The name of the function is type. It returns int.

  • The expression in parentheses is called the argument of the function.
  • The argument is a value or variable that we are passing into the function as input to the function.

Therefore, a function takes an argument and returns a result.

INSTRUCTIONS

Try calling the type function on other arguments of your choice and see the results.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...