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

Ready to put everything you've learned into practice? This challenge will require you to use the and, or, and not operators as well as boolean comparison operators to manage a complex scenario for a grocery store.

Let's dive in!

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

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 3. Capítulo 3
toggle bottom row

Challenge

Ready to put everything you've learned into practice? This challenge will require you to use the and, or, and not operators as well as boolean comparison operators to manage a complex scenario for a grocery store.

Let's dive in!

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

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 3. Capítulo 3
toggle bottom row

Challenge

Ready to put everything you've learned into practice? This challenge will require you to use the and, or, and not operators as well as boolean comparison operators to manage a complex scenario for a grocery store.

Let's dive in!

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

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

¿Todo estuvo claro?

Ready to put everything you've learned into practice? This challenge will require you to use the and, or, and not operators as well as boolean comparison operators to manage a complex scenario for a grocery store.

Let's dive in!

Tarea

You need to determine if a grocery item should be discounted based on its seasonal status, stock level, and sales performance.

  1. Use the predefined conditions to determine if an item is at risk of being overstocked by checking if it is seasonal and its stock exceeds a specific threshold. If the item is seasonal and the current_stock is greater than the high_stock_threshold, then the boolean variable overstockRisk should become True.
  2. Evaluate if an item is eligible for a discount based on its sales performance and whether it is already on sale. Check if the item is not selling_well and not already on_sale.
  3. Decide if the item should be discounted based on the overstock risk or its discount eligibility results. The makeDiscount boolean variable should become True if either overstockRisk or discountEligible is True.
  4. Print whether the item should be discounted based on the final combined condition - makeDiscount.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 3. 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