# Loop through the prices in levelsList.
# During each loop:
# - Create a variable called priceLevelLabel consisting of the text 'Price Level: ' followed
# by the price.
# - Add priceLevelLabel and the price as two separate items to a new list (the sub-List).
# - Append the sub-List to displayList.
for price in self.levelsList:
...
# Create a variable called previousPriceLabel consisting of the text 'Previous Price: ' followed
# by previousPrice.
# Add previousPriceLabel and previousPrice as two separate items to a new list (the sub-List).
# Append the sub-List to displayList.
...
# Create a variable called currentPriceLabel consisting of the text 'Current Price: ' followed
# by currentPrice.
# Add currentPriceLabel and currentPrice as two separate items to a new list (the sub-List).
# Append the sub-List to displayList.
...
for price in self.levelsList:
priceLevelLabel = 'Price Level: ' +str(price)
sub_List = [priceLevelLabel, price]
displayList.append(sub_List)
currentPriceLabel = 'Current Price: '+str(currentPrice)
sub_List1 = [currentPriceLabel, currentPrice]
displayList.append(sub_List1)
Comments
Leave a comment