Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Given the user inputs, complete a program that does the following tasks: PYTHON CODE please Define a list, my_list, containing the user inputs: my_flower1, my_flower2,

Given the user inputs, complete a program that does the following tasks: PYTHON CODE please

Define a list, my_list, containing the user inputs: my_flower1, my_flower2, and my_flower3 in the same order.

Define a list, your_list, containing the user inputs, your_flower1 and your_flower2, in the same order.

Define a list, our_list, by concatenating my_list and your_list.

Append the user input, their_flower, to the end of our_list.

Replace my_flower2 in our_list with their_flower.

Remove the first occurrence of their_flower from our_list without using index().

Remove the second element of our_list.

Observe the output of each print statement carefully to understand what was done by each task of the program.

Ex: If the input is:

 

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