Question: %%%% Python Jupitar Notebook %%%% Q3 (2 pts) Test for an element in a string Write a function linear earch , which accepts a list

%%%% Python Jupitar Notebook %%%%

%%%% Python Jupitar Notebook %%%% Q3 (2 pts) Test for an element

Q3 (2 pts) Test for an element in a string Write a function linear earch , which accepts a list t and an integer as parameters. Use a ile o p nota or oo to te ate through each element of from beginning to end and, if v is found in t, return its index. If v is not found, return -1. Your code must properly handle lists that contain non-integer elements. In t 1 Q4 (2 pts) Keep track of your pets Create a dictionary of pet names and what kind of animal they are. For example, if ou, have a do named Hamm on "dog". ou wil make an en or Hammond 1. Put at least three (3) key-value pairs in your dictionary. 2. Write a loop that will print out a sentence for each pair like: "Hammond is a dog." In t 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!