Exercícios de Strings em Python

Exercícios de Strings em Python

8th Grade

10 Qs

quiz-placeholder

Similar activities

R6_2.N_Lógica Computacional - Java 2

R6_2.N_Lógica Computacional - Java 2

2nd Grade - University

15 Qs

Pensamento Computacional -  Recuperação

Pensamento Computacional - Recuperação

8th Grade - University

13 Qs

Educação Tecnológica

Educação Tecnológica

8th Grade

11 Qs

robotica 2024

robotica 2024

6th - 8th Grade

15 Qs

Code.org (Introdução à programação)

Code.org (Introdução à programação)

5th - 9th Grade

12 Qs

Fato ou Fake?

Fato ou Fake?

8th Grade

11 Qs

Quiz de Tecnologia sobre informática básica

Quiz de Tecnologia sobre informática básica

6th - 8th Grade

14 Qs

Comunicação Digital

Comunicação Digital

6th - 8th Grade

15 Qs

Exercícios de Strings em Python

Exercícios de Strings em Python

Assessment

Quiz

Instructional Technology

8th Grade

Hard

Created by

Ana Almeida

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual a função utilizada para encontrar o comprimento de uma string em Python?

length()

count()

len()

size()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como podemos verificar se uma determinada substring está presente em uma string em Python?

string_principal in substring

string_principal.contains(substring)

substring not in string_principal

substring in string_principal

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explique a diferença entre as funções upper() e lower() em Python.

upper() converte para minúsculas e lower() converte para maiúsculas.

upper() converte para minúsculas e lower() converte para números.

upper() converte para minúsculas e lower() não faz nada.

upper() converte para maiúsculas e lower() converte para minúsculas.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como podemos concatenar duas strings em Python?

string1 - string2

string1 . string2

string1 * string2

string1 + string2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual a função utilizada para dividir uma string em substrings com base num separador em Python?

replace()

slice()

strip()

split()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como podemos inverter uma string em Python?

string.reverse

string.reverse

string[::-1]

string.reverse()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Explique o que é indexação negativa em Python e como podemos utilizá-la em strings.

Indexação negativa em Python não é uma funcionalidade válida para strings

Indexação negativa em Python não permite acessar caracteres no final da string

Podemos utilizar a indexação negativa em Python apenas em listas, não em strings

Podemos utilizar a indexação negativa em strings em Python da seguinte forma: string = 'hello world'; ultimo_caractere = string[-1]; penultimo_caractere = string[-2];

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Instructional Technology