Contenido del Curso
Introduction to Python Video Course
Introduction to Python Video Course
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.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.
¿Todo estuvo claro?
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.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.
¿Todo estuvo claro?
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.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.
¿Todo estuvo claro?
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.
Tarea
- Define the Function: Use the proper keyword to define the
check_promotions
function. - Trigger another Function: Within the
check_promotions
function, call theapply_discount
function to ensure that any discounts are applied to prices in theproducts
dictionary. return
Discounted Price: Ensure thediscounted_price
function returns the values for other functions to use.- Built-in Function: Use the proper built-in functions to find the summation of the values in the
items
dictionary. - Call
calculate_final_cost
: Pass theproducts
dictionary to thecalculate_final_cost
function to get the total cost including tax.