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

Are you ready to apply your new knowledge of lists and list methods in a practical setting?

This challenge will engage you in managing a grocery store's deli department items, requiring you to utilize nested lists, list methods, and conditional logic.

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

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

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

Секція 4. Розділ 3
toggle bottom row

Challenge

Are you ready to apply your new knowledge of lists and list methods in a practical setting?

This challenge will engage you in managing a grocery store's deli department items, requiring you to utilize nested lists, list methods, and conditional logic.

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

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

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

Секція 4. Розділ 3
toggle bottom row

Challenge

Are you ready to apply your new knowledge of lists and list methods in a practical setting?

This challenge will engage you in managing a grocery store's deli department items, requiring you to utilize nested lists, list methods, and conditional logic.

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

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

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

Are you ready to apply your new knowledge of lists and list methods in a practical setting?

This challenge will engage you in managing a grocery store's deli department items, requiring you to utilize nested lists, list methods, and conditional logic.

Завдання

  1. Use the following data to initialize the meat, cheese, and condiment lists:
    TypePriceShelf QuantitySpecifics
    Ham$3.9950Sliced
    Cheddar$5.49100Sharp
    Mustard$1.9975Spicy
  2. The aisle with the "Ham" has been restocked, so you need to update its quantity to 100. Ensure that the meat list includes the "Ham" string and that it has fewer than 100 items in stock. If so, update its quantity to 100.
  3. Construct the seasonal_meat list using the table below and then use the append() method to add the seasonal_meat variable to the deli_dept list:
    TypePriceShelf QuantitySpecifics
    Turkey$4.50100Sliced
  4. Remove the condiment list item from the deli_dept.
  5. Sort the deli_dept list alphabetically.

Note

When you sort a list containing other lists, it will sort them based on the first value of each sublist. In our example, when we sort the deli_dept list, the sorting is based on the strings "Ham", "Cheddar", and "Turkey".

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