3.18 LAB: The basics of lists - the Beatles Estimated time 10-15 minutes Level of difficulty Easy Objectives Familiarize the student with: • creating and modifying simple lists; • using methods to modify lists. Scenaria The Beatles were one of the most popular music group of the 1960s, and the best-selling band in history. Some people consider them to be the most influential act of the rock era. Indeed, they were included in Time magazine's compilation of the 20th Century's 100 most influential people. The band underwent many line-up changes, culminating in 1962 with the line-up of John Lennon, Paul McCartney, George Harrison, and Richard Starkey (better known as Ringo Starr). Write a program that reflects these changes and lets you practice with the concept of lists. Your task is to: step 1: create an empty list named beatles; step 2: use the append () method to add the following members of the band to the list: John Lennon, Paul Mc Cartney, and George Harrison; step 3: create a list called new_ members and assign it the values Stu Sutcliffe and Pete Best, add this new list to the beatles list; step 4: use the remove() instruction to remove Stu Sutcliffe and pop () to remove Pete Best from the list; step 5: use the insert() method to add Ringo Starr to the beginning of the list. By the way, are you a Beatles fan?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

This is what i have for this code but a lot is worng and i dont know why

 

 

# Step 1:
beatles = []
print("Step 1:", beatles)

# Step 2:
beatles = ["John Lennon", "Paul McCartney", "George Harrison"]
print("Step 2:", beatles)

# Step 3:
new_members = []
new_members = ["Stu Sutcliffe", "Pete Best"
beatles.append(new_members)
print("Step 3:", beatles),

# Step 4:
beatles.remove("Stu Sutcliffe")
beatles.pop(1)
print("Step 4:", beatles)

# step 5
beatles.insert(0, 'Ringo Starr')
print("Step 5:", beatles)
print("The Fab", len(beatles))

3.18 LAB: The basics of lists - the Beatles
Estimated time
10-15 minutes
Level of difficulty
Easy
Objectives
Familiarize the student with:
• creating and modifying simple lists;
• using methods to modify lists.
Scenario
The Beatles were one of the most popular music group of the 1960s, and the best-selling band in history. Some people consider them to
be the most influential act of the rock era. Indeed, they were included in Time magazine's compilation of the 20th Century's 100 most
influential people.
The band underwent many line-up changes, culminating in 1962 with the line-up of John Lennon, Paul McCartney, George Harrison, and
Richard Starkey (better known as Ringo Starr).
Write a program that reflects these changes and Ilets you practice with the concept of lists. Your task is to:
step 1: create an empty list named beatles;
step 2: use the append () method to add the following members of the band to the list: John Lennon, Paul McCartney, and George
Harrison;
step 3: create a list called new_members and assign it the values Stu Sutcliffe and Pete Best, add this new list to the beatles list;
step 4: use the remove () instruction to remove Stu Sutcliffe and pop ) to remove Pete Best from the list;
step 5: use the insert() method to add Ringo Starr to the beginning of the list.
By the way, are you a Beatles fan?
Transcribed Image Text:3.18 LAB: The basics of lists - the Beatles Estimated time 10-15 minutes Level of difficulty Easy Objectives Familiarize the student with: • creating and modifying simple lists; • using methods to modify lists. Scenario The Beatles were one of the most popular music group of the 1960s, and the best-selling band in history. Some people consider them to be the most influential act of the rock era. Indeed, they were included in Time magazine's compilation of the 20th Century's 100 most influential people. The band underwent many line-up changes, culminating in 1962 with the line-up of John Lennon, Paul McCartney, George Harrison, and Richard Starkey (better known as Ringo Starr). Write a program that reflects these changes and Ilets you practice with the concept of lists. Your task is to: step 1: create an empty list named beatles; step 2: use the append () method to add the following members of the band to the list: John Lennon, Paul McCartney, and George Harrison; step 3: create a list called new_members and assign it the values Stu Sutcliffe and Pete Best, add this new list to the beatles list; step 4: use the remove () instruction to remove Stu Sutcliffe and pop ) to remove Pete Best from the list; step 5: use the insert() method to add Ringo Starr to the beginning of the list. By the way, are you a Beatles fan?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY