Online Test - Strings

Beschreibung

Quiz am Online Test - Strings, erstellt von Aparna Dhirde am 15/03/2020.
Aparna Dhirde
Quiz von Aparna Dhirde, aktualisiert more than 1 year ago
Aparna Dhirde
Erstellt von Aparna Dhirde vor fast 6 Jahre
140
0

Zusammenfassung der Ressource

Frage 1

Frage
A string is a sequence of characters enclosed in ………
Antworten
  • single quote
  • double quote
  • triple quote
  • all of the above

Frage 2

Frage
What will be the output of the following Python statement? >>>”a”+“bc”
Antworten
  • a
  • bc
  • bca
  • abc

Frage 3

Frage
What arithmetic operators cannot be used with strings?
Antworten
  • +
  • *
  • -
  • All of the mentioned

Frage 4

Frage
The format function, when applied on a string returns ___________
Antworten
  • Error
  • int
  • bool
  • str

Frage 5

Frage
Python does not have a character data type.
Antworten
  • True
  • False

Frage 6

Frage
Strings in Python are mutable
Antworten
  • True
  • False

Frage 7

Frage
Retrieving a portion of a string is called slicing
Antworten
  • True
  • False

Frage 8

Frage
Indexing is used for accessing individual characters within a string.
Antworten
  • True
  • False

Frage 9

Frage
Each character of a string can be accessed either using a for loop or while loop.
Antworten
  • True
  • False

Frage 10

Frage
What will be the output of the following Python statement? >>>”abcd”[2:]
Antworten
  • a
  • ab
  • cd
  • dc
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt