Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge | Functions
Introduction to Python Video Course
course content

Course Content

Introduction to Python Video Course

Introduction to Python Video Course

1. Getting Started
2. Variables and Types
3. Conditional Statements
4. Other Data Types
5. Loops
6. Functions

Challenge

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 6. Chapter 3
toggle bottom row

Challenge

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 6. Chapter 3
toggle bottom row

Challenge

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Task

In this challenge, you’ll create a function to update the inventory of a grocery store by adding new products. You’ll pass the new products as arguments to the function and the function will combine them with the existing inventory list.

Task:

  1. Define a Function: Use the proper keyword to define a function named inventory_update.
  2. Complete the Return Statement: Return the update inventory variable from the function.
  3. Call the Function with Arguments: Inside the print() statement, call the inventory_update function with current_inventory as the argument.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 6. Chapter 3
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt