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

write an equation that is perpendicular to the line y = 2x + 13?
Compute the odds in favor of rolling a sum of 10 in a single roll of two fair dice
Compute the odds in favor of rolling a sum of 10 in a single roll of two fair dice
Hey, need some help reverent A. respectful B. respect C. reply D. to spoil
what does como eres tu mean in spanish?
which foods earthworms can digest?
which of the following expressions does not equal: the sixth root of 81x^4y^8 a. (3xy^2)^2/3 b. (3x)^2/3y^4/3 c. (3x^2y^4)^1/3 d. cube root of 9x^2y^4
what is force ?is it desirable or undesirable?
write an equation that is perpendicular to the line y = 2x + 13?
Two diverging light rays, originating from the same point, have an angle of 5° between them. After the rays reflect from a plane mirror, what is the angle betwe