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

Зміст курсу

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!

Завдання

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.

Завдання

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.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 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!

Завдання

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.

Завдання

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.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 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!

Завдання

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.

Завдання

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.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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!

Завдання

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.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 3
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt