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 is meant by the term "cryptochidsm"?
Define Dramatic Irony. Give an example of dramtic irony from any book, story or movie.
compare and contrast genetic engineering to the process of natural selection.
The fiscal policy of government can have a _________ impact on the economy.
What is 0.774193 rounded to the nearest tenth
The Housing and Urban Development Act of 1965 and the Fair Housing Act of 1968 were both aimed at limiting the number of houses built in urban areas. creating m
Can someone help me
​a commanding officer gives a soldier an order that he knows the soldier would rather not obey. according to the findings of the milgram obedience experiments,
What sentence represents the number of test questions in the problem below? A test is worth 80 points. Multiple-choice questions are worth 2 points, and short-
Simplify. 25ab6 A) 5ab3 B) 5b3 a C) 5b2 a D) 25b3 a