Votefy
Votefy Votefy
  • 02-06-2021
  • Computers and Technology
contestada

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 class=

Respuesta :

fichoh
fichoh fichoh
  • 07-06-2021

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 Link

Otras preguntas

What were the only 2 times Japan was ever successfully invaded by a foreign power
Explain how to determine the zeros of f(x)=(x+3)(x-1)(x-8)
which of the following statement is true
How does the tilt of the Earth's axis affect the seasons
Can anyone help with this I’ll mark brainliest!!!
John is traveling north at 20 meters/second and his friend Betty is traveling south at 20 meters/second. If north is the positive direction, what are John and B
Which statement describes the main impact of the voyages of Bartolomeu Dias and Vasco da Gama? They demonstrated that it was easier to reach Asia by land than b
resistance to slavery
Which expression represents "5 less than the product of 9 and the sum of a number and 3"?
Please answer correctly! Dropbox 1 options: A. (9.5, 0) B. (4.5, 0) C. (-9.5, 0) D. (-4.5, 0) Dropbox 2 options: A. (0, 3) B. (0, 1) C. (0, -3) D. (0, -1)