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

Conteúdo do 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

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 6. Capítulo 3
toggle bottom row

Challenge

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 6. Capítulo 3
toggle bottom row

Challenge

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 6. Capítulo 3
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt