Quiz sobre Strings em Python

Quiz sobre Strings em Python

Assessment

Quiz

Created by

Anderson Vaz

Computers

Professional Development

3 plays

Hard

Student preview

quiz-placeholder

23 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você define uma string em Python?

Entre colchetes []

Entre aspas simples (' ') ou duplas (' ')

Usando o operador =

Entre chaves { }

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das seguintes opções é válida para criar uma string?

string = [Olá, Python]

string = "Olá, Python"

string = {Olá, Python}

string = Olá, Python

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que a função capitalize() faz com uma string?

Converte todas as letras para maiúsculas

Remove espaços extras

Transforma a primeira letra em maiúscula

Concatena strings

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que o método replace() faz em uma string?

Remove caracteres indesejados

Substitui partes da string por outra

Concatena duas strings

Divide a string em partes menores

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é o resultado de: print(len("Python"))?

5

6

7

8

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é o resultado do código: print("Olá, Python".find("Python"))?

-1

5

7

0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você escapa uma aspa dupla dentro de uma string delimitada por aspas duplas?

\"

""

\\

\'

Explore all questions with a free account

or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?