Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 . 2 0 LAB: List basics Instructor note: Reminders: to create a list: the _ list = [ one , two, three ] to

3.20 LAB: List basics
Instructor note:
Reminders:
to create a list: the_list =[one, two, three]
to combine (concatenate) lists: one_list + two list
to add thing to a list: the list. append (thing)
to find the position (index) of thing in a list: the_list. index (thing)
to assign something to an index of a sequence (string or list): the_list [index]= thing
to remove an element from a list: the list.remove (thing)
to remove an element from a list and assign it to a variable: result = the_list.pop (index)
Given the user inputs, complete a program that does the following tasks:
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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

What is the purpose of the staffing practice called Two-in-aBox?

Answered: 1 week ago