Online Test - Strings

Descrição

Quiz sobre Online Test - Strings, criado por Aparna Dhirde em 15-03-2020.
Aparna Dhirde
Quiz por Aparna Dhirde, atualizado more than 1 year ago
Aparna Dhirde
Criado por Aparna Dhirde quase 6 anos atrás
140
0

Resumo de Recurso

Questão 1

Questão
A string is a sequence of characters enclosed in ………
Responda
  • single quote
  • double quote
  • triple quote
  • all of the above

Questão 2

Questão
What will be the output of the following Python statement? >>>”a”+“bc”
Responda
  • a
  • bc
  • bca
  • abc

Questão 3

Questão
What arithmetic operators cannot be used with strings?
Responda
  • +
  • *
  • -
  • All of the mentioned

Questão 4

Questão
The format function, when applied on a string returns ___________
Responda
  • Error
  • int
  • bool
  • str

Questão 5

Questão
Python does not have a character data type.
Responda
  • True
  • False

Questão 6

Questão
Strings in Python are mutable
Responda
  • True
  • False

Questão 7

Questão
Retrieving a portion of a string is called slicing
Responda
  • True
  • False

Questão 8

Questão
Indexing is used for accessing individual characters within a string.
Responda
  • True
  • False

Questão 9

Questão
Each character of a string can be accessed either using a for loop or while loop.
Responda
  • True
  • False

Questão 10

Questão
What will be the output of the following Python statement? >>>”abcd”[2:]
Responda
  • a
  • ab
  • cd
  • dc