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

Contenido del Curso

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

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 6. Capítulo 3
toggle bottom row

Challenge

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 6. Capítulo 3
toggle bottom row

Challenge

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 6. Capítulo 3
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt