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

Can someone help me find the slope of the line going through
What class did Cleisthenens come from ?
Find the x-intercepts and y-intercept for the parabola below. Write answers as (x,y) coordinates. y=-7x2-4x+3 x-int:______________ y-int:________
Within which range does a Local Area Network (LAN) work? A Local Area Network (LAN) covers short distances, generally residing within A. state
A shocking fact: 66% of all teenagers have a tv set in their room. if an opinion poll chooses an srs of 1000 teens and asks if they have a tv set in their room,
what was the main concern of Confucianism?
What is the opposite rational number of 10/7? *?
jack bought 3 slices of cheese pizza and 4 slices of nushroom pizza for a total cost of $12.50. Grace bought 3 slices of cheese pizza and 2 slices of mushroom p
Choose the correct ordered pair
wo teachers are discussing thesis statements. Teacher A says that a thesis statement should reflect the main idea of the paragraph that it's in. Teacher B says