pinkeyfox23
pinkeyfox23 pinkeyfox23
  • 20-06-2021
  • Computers and Technology
contestada

>What is the output of the following code:

list1 = [ 'cyber', 786 , 2.23, 'square', 70.2 ]
print (list1[1] )

Respuesta :

codiepienagoya codiepienagoya
  • 25-06-2021

Answer:

Given code output is "786".

Explanation:

Code:

list1 = [ 'cyber', 786 , 2.23, 'square', 70.2 ]#defining a list list1 that holds value in parameter

print (list1[1] )#use a print method that prints list index value

In the given code a list "list1" is declared that holds value in it and in the next step a print method is declared that prints the first index value of the list.

Ver imagen codiepienagoya
Answer Link

Otras preguntas

Is this a Function or not?
Which jet stream affects weather in the United States
According to Wiesel, how can indifference be "tempting"?
Which part of an atom has most of its mass? A.electrons B.neutrons C.nucleus D.protons
Angle A and B are supplementary. Angle a has a measure of 80. What is the measure of angle B? The measure of angle B is
Peters glasses each hold 8 fluid ounces how many glasses of juice can peter pour from a bottle that holds 2 quarts
a number no more than 5. how do you graph this inequality
The bocker hotel has three types of single rooms. there are 80 type a rooms with a rack rate of $75; 90 type b rooms with a rack rate of $80; and 100 type c roo
Choose the equation of the horizontal line that passes through the point (2, 3). A. x = 2 B.x = 3 C. y = 2 D.y = 3
Electromagnetic energy travels through space in waves. The electromagnetic spectrum includes all electromagnetic waves, arranged according to frequency and wave