Write code that finds a given value in a list . The list is called stuList and contains a list of names of students. a.

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: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write code that finds a given value in a list . The list is called stuList and contains a list of names of students. a.

Post by answerhappygod »

Write code that finds a given value in a list . The list iscalled stuList and contains a list ofnames of students.a. Complete the code to locate a given student name within the listand print the indexat which the value was found. Should the value be not present inthe list a negativeindex should be shown. The search key is declared and initializedfor you and itcontains the name "deo"
def main():# list created and called stuList# searchList contains names of students# eg 'ratneel', 'john', 'abby', 'deo', and other namessearchKey = 'deo'#write code here
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply