Values = [ 14, 10, 8, 19, 7.13] print the interger at index 2 of values and print the integer at index -2 of values, both on one line.

Respuesta :

Therefore, the final code would be:values = [ 14, 10, 8, 19, 7.13] print(values[2], values[-2])This code would print the following output:8 19

What is meant by indices?

Indices, also known as exponents or powers, are mathematical symbols that express the repeated multiplication of a number. These numbers show how many times the base number has been multiplied by itself. For example, the index of 2 in the formula 23 is 3, which indicates that 2 is multiplied by itself three times to provide the value 8. Indices are often written as little numbers to the right and above the base number, with the latter enclosed in parentheses or brackets. Indices are often used to indicate the size or quantity of a number in mathematical model, but they may also be used to represent the degree of a polynomial function or the order of a derivative in calculus.

How to solve?

To print the integer at index 2 of the values list, we can use the following code: print(values[2])

To print the integer at index -2 of the values list, we can use the following code: print(values[-2])

Here, the index -2 refers to the second-to-last element in the list, which is the integer 19.

Therefore, the final code would be:

values = [ 14, 10, 8, 19, 7.13]

print(values[2], values[-2])

This code would print the following output:

8 19

To learn more about indices, visit:

https://brainly.com/question/28093573

#SPJ4