Question
IT 2431 Python Lab #04 - LIST There are five flower names rose, peony, lily, rose, daisy, and aster. Given user inputs, complete a program
IT 2431 Python Lab #04 - LIST There are five flower names rose, peony, lily, rose, daisy, and aster. Given user inputs, complete a program that does the following tasks: Step 1: Enter five flower names from the Keyboard and save them to the identifiers my_flower1, my_flower2, my_flower, your_flower1, your_flower2, and their_flower Step 2: Define a list, my_list, containing the user inputs: my_flower1, my_flower2, and my_flower3. print my_list Step 3: Define a list, your_list, containing the user inputs, your_flower1 and your_flower2. print your_list Step 4: Define a list, our_list, by concatenating my_list and your_list print our_list Step 5: Append the user input, their_flower, to the end of our_list print our_list Step 6: Replace my_flower2 in our_list with their_flower. print our_list Step 7: Remove the first occurrence of their_flower from our_list without using index(). print our_list Step 8: Remove the second element of our_list. print our_list Input step 1: myflower 1: rose myflower 2: peony myflower 3: lily yourflower 1:rose yourflower 2:daisy theirflower: aster Output Step 2: ['rose', 'peony', 'lily'] Step 3: ['rose', 'daisy'] Step 4: ['rose', 'peony', 'lily', 'rose', 'daisy'] Step 5: ['rose', 'peony', 'lily', 'rose', 'daisy', 'aster'] Step 6: ['rose', 'aster', 'lily', 'rose', 'daisy', 'aster'] Step 7: ['rose', 'lily', 'rose', 'daisy', 'aster'] Step 8: ['rose', 'rose', 'daisy', 'aster']
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started