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 implied if a firm is losing money?
how to do this question?
advantages and disadvantages of coal
A first-time bungee jumper is about to make his first jump. When the bungee jumper jumps, he will fall 5 feet every 0.5 second. Part A. Let s be the total num
8 and 2 quadratic equations with the given roots.
Bob and mark talk about their families. Bob says he has 3 kids, the product of their ages is 72. He gives another clue: the sum of the ages of his children. Mar
upper respiratory infection
A bag contains 4 pennies, 6 nickels, and 10 dimes. What is the probability of randomly selecting a nickel or dime from the bag?
How do you count triplets in 3/2 time?
mitosis and meiosis similarities