GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

On line Test- Tuples and Dictionary

Aparna Dhirde 15 Fragen

Quiz starten

Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.

Fragen in diesem Quiz (15)

  1. 1Slicing is used to extract a part of the tuple
    1. ARichtig
    2. BFalsch
  2. 2Each key is separated from its value by a colon
    1. ARichtig
    2. BFalsch
  3. 3Keys are unique and act as the index
    1. ARichtig
    2. BFalsch
  4. 4Keys are of mutable type but values can be immutable
    1. ARichtig
    2. BFalsch
  5. 5Elements of tuple is enclosed in square brackets
    1. ARichtig
    2. BFalsch
  6. 6What will be the output of the following Python code?
    >>>t=(1,2,4,3)
    >>>t[1:-1]
    1. A(1, 2)
    2. B(1, 2, 4)
    3. C(2,4)
    4. D(2, 4, 3)
  7. 7What will be the output of the following Python code?
    >>>t = (1, 2, 4, 3, 8, 9)
    >>>[t[i] for i in range(0, len(t), 2)]
    1. A[2, 3, 9]
    2. B[1, 2, 4, 3, 8, 9]
    3. C[1,4,8]
    4. D(1, 4, 8)
  8. 8What will be the output of the following Python code?
    >>>t = (1, 2)
    >>>2 * t
    1. A[1, 2, 1, 2]
    2. B(1, 1, 2, 2)
    3. C[1, 1, 2, 2]
    4. D(1,2,1,2)
  9. 9What will be the output of the following Python code?
    >>>t1 = (1, 2, 4, 3)
    >>>t2 = (1, 2, 3, 4)
    >>>t1 < t2
    1. ATrue
    2. BFalse
    3. Cerror
    4. Dnone
  10. 10Which of the following statements create a dictionary?
    1. Ad = {}
    2. Bd = {“john”:40, “peter”:45}
    3. Cd = {40:”john”, 45:”peter”}
    4. DAll of the above

Informationen

Beschreibung
Quiz am On line Test- Tuples and Dictionary, erstellt von Aparna Dhirde am 18/03/2020.
Sprache
English
Aufrufe
122
Schlagwörter
xi
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Mehr zu Python Lists and Data Structures

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck