Skip to content
dreamcode
dreamcode
Back to map
Parameters · Lesson 15 of 44
+15 XP on finish
PYTHON BASICS

Inputs to functions

To make a function do different things depending on the situation, we give it parameters (inputs). When we call the function, we pass arguments (values) into those parameters.

How it reads
def greet(name, time): defines two parameters, name and time
greet("Nova", "morning") calls the function, passing "Nova" into name and "morning" into time
The arguments must be passed in the same order as the parameters
Cloud tip: Parameters are the names listed in the function definition. Arguments are the actual values you send to the function when calling it.
main.py
PYTHON
real Python, runs in your browser
CONSOLE
- run your code to see output -