What is the output of print(tuple[2:]) if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?

Anonymous
timer Asked: Jul 5th, 2016
account_balance_wallet $5

Question Description

Question 1

  1.  

    What is the output of print(tuple[2:]) if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?

    ( 'abcd', 786 , 2.23, 'john', 70.2 )

    abcd

    (786, 2.23)

    (2.23, 'john', 70.2)

1 points  

Question 2

  1.  

    What is the output of print(tuple[-3:]) if tuple = ( 'abcd', 786 , 2.23, 'john', 70.2 )?

    ( 'abcd', 786 , 2.23, 'john', 70.2 )

    abcd

    (786, 2.23)

    (2.23, 'john', 70.2)

1 points  

Question 3

  1.  

    when referencing the first index value within a list, in reference to the last element’s position, we begin with an index of:

    0

    1

    -1 

    any value

1 points  

Question 4

  1.  

    Dictionaries use what to uniquely identify each of its elements.

    name

    index

    value

    fractional index

1 points  

Question 5

  1.  

    unlike lists, a dictionary can only hold elements of the same data type.

1 points  

Question 6

  1.  

    Dictionaries, while normally use names to reference an element, can also use index values.

1 points  

Question 7

  1.  

    When we want our program to re-cycle after each use, that is, continue running until the user chooses to stop, we use a:

    for loop

    while loop

    do-while loop

    switch statement

1 points  

Question 8

  1.  

    In OOP with Python, when a variable belongs to an object, we refer to it as a:

    variable

    attribute

    field

    object cannot contain variables.

1 points  

Question 9

  1.  

    In OOP with Python, when a function belongs to an object, we refer to it as a:

    function

    method

    procedure

    objects cannot contain functions.

1 points  

Question 10

  1.  

    When defining a class’s attributes, what does the double underscore prefix mean?

    the variable is static

    the variable is private and cannot be seen by outside code

    the variable is public and can be seen by outside code

    the variable cannot be changed


Tutor Answer

DrCS
School: Duke University

1) (2.23, 'john', 70.2)2) (2.23, 'j...

flag Report DMCA
Review

Anonymous
awesome work thanks

Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors