Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

This is my assignment in Python, need help on part B Exercise. 1 Lists, slicing and for statements. Given the list named pizzas In (1)t

This is my assignment in Python, need help on part B
image text in transcribed
Exercise. 1 Lists, slicing and for statements. Given the list named pizzas In (1)t plzas = ''cheese', pepperoni', "margherito', 'havailan', 'Italian sausage', "green peppers and oniona'I a) Using for statements and the method of lists called append, append in the Ist lengths the length of each element in the pizzas Ist, and print the list langths. In{20}:lengthe=(6,9,10,8,15,24]forxinlengthspizans.append(x)print(pitzan) L'cheede:, "pepperoni', 'nargherita", "hawaidan', 'italian sausage', 'green peppera and oniona', 6, 9 , 10, 8,15,241 In[1= b) Using for statements, the string method called eapitailze and the method of lists called append, append in the lst pizzal cap the capitalized version of each element in the pizzas list, and print the list pirzas_cap. In{22}1]In1]1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions