I got some indentation errors when I ran your code. Also fix it so it runs withourt any error staff=["King","Rock","Newt

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

I got some indentation errors when I ran your code. Also fix it so it runs withourt any error staff=["King","Rock","Newt

Post by answerhappygod »

I got some indentation errors when I ran your code. Also fix it
so it runs withourt any error
staff=["King","Rock","Newton","Kelly", "Jacob Turner"]
new_staff=[]
new_staff.append(input())
while(new_staff[-1]!="STOP"):
new_staff.append(input())
staff.extend(new_staff)
for i in range(0,len(staff)-1):
if(staff=="Kelly Baker"):
staff.remove("Kelly Baker")
a=staff.index("Jacob Turner")
for i in range(a-2,a+3):
if(staff=="Jacob Turner"):
continue
else:
print(staff)
staff.insert(9,"steve")
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply