Answer:
Jog
Explanation:
The variable options is a list containing 5 string values
options = ["ski", "surf", "jog", "bike", "hike"]
Indexing in python starts from 0 ; hence the index values of the list values are :
0 - ski
1 - surf
2 - jog
3 - bike
4 - hike
The statement ;
print(options[2]) means print the string at index 2 in the list named options
The string at index 2 is jog ;
Hence, the string jog is printed.
Answer:
Explanation:
Please find attachment for the Python program
Linear search
You implement this algorithm by iterating over each item, and checking if the item matches what you are searching for.
It is linear because it takes a linear amount of time to search for an item.