Зміст курсу
Introduction to Python Video Course
Introduction to Python Video Course
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.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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"
.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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"
.
Все було зрозуміло?
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.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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"
.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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"
.
Все було зрозуміло?
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.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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"
.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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.
Завдання
- Use the following data to initialize the
meat
,cheese
, andcondiment
lists:Type Price Shelf Quantity Specifics Ham $3.99 50 Sliced Cheddar $5.49 100 Sharp Mustard $1.99 75 Spicy - The aisle with the
"Ham"
has been restocked, so you need to update its quantity to100
. Ensure that themeat
list includes the"Ham"
string and that it has fewer than100
items in stock. If so, update its quantity to100
. - Construct the
seasonal_meat
list using the table below and then use theappend()
method to add theseasonal_meat
variable to thedeli_dept
list:Type Price Shelf Quantity Specifics Turkey $4.50 100 Sliced - Remove the
condiment
list item from thedeli_dept
. - 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"
.