64.4k views
1 vote
what would be the result of running these two lines of code

Ski

Surf

Jog

Hike

what would be the result of running these two lines of code Ski Surf Jog Hike-example-1
User Drgxfs
by
5.3k points

1 Answer

5 votes

Answer:

Jog

Step-by-step 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.

User ZahiC
by
6.3k points