Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Capstone 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

Capstone Challenge

You are building a basic checkout system for a grocery store. The system needs to check if any of the products a customer is buying are on promotion, apply the corresponding discounts, and calculate the final cost including tax.

This challenge will test your understanding of built-in functions, user-defined functions, and working with keyword arguments.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

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

Everything was clear?

Section 6. Chapter 6
toggle bottom row

Capstone Challenge

You are building a basic checkout system for a grocery store. The system needs to check if any of the products a customer is buying are on promotion, apply the corresponding discounts, and calculate the final cost including tax.

This challenge will test your understanding of built-in functions, user-defined functions, and working with keyword arguments.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

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

Everything was clear?

Section 6. Chapter 6
toggle bottom row

Capstone Challenge

You are building a basic checkout system for a grocery store. The system needs to check if any of the products a customer is buying are on promotion, apply the corresponding discounts, and calculate the final cost including tax.

This challenge will test your understanding of built-in functions, user-defined functions, and working with keyword arguments.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

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

Everything was clear?

You are building a basic checkout system for a grocery store. The system needs to check if any of the products a customer is buying are on promotion, apply the corresponding discounts, and calculate the final cost including tax.

This challenge will test your understanding of built-in functions, user-defined functions, and working with keyword arguments.

Task

  1. Define the Function: Use the proper keyword to define the check_promotions function.
  2. Trigger another Function: Within the check_promotions function, call the apply_discount function to ensure that any discounts are applied to prices in the products dictionary.
  3. return Discounted Price: Ensure the discounted_price function returns the values for other functions to use.
  4. Built-in Function: Use the proper built-in functions to find the summation of the values in the items dictionary.
  5. Call calculate_final_cost: Pass the products dictionary to the calculate_final_cost function to get the total cost including tax.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 6. Chapter 6
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