Stringmethoden in Python

Stringmethoden in Python

University

10 Qs

quiz-placeholder

Similar activities

Tutorium 3

Tutorium 3

University

9 Qs

HTML BASICS 1

HTML BASICS 1

University

15 Qs

Python Quiz

Python Quiz

University

12 Qs

kotlin Quiz 2

kotlin Quiz 2

University

12 Qs

Python input, output, and errors

Python input, output, and errors

University

14 Qs

Icons used in ICT

Icons used in ICT

University

10 Qs

Python_R

Python_R

2nd Grade - Professional Development

8 Qs

Python-Grundlagen (IF Kl. 10)

Python-Grundlagen (IF Kl. 10)

10th Grade - University

15 Qs

Stringmethoden in Python

Stringmethoden in Python

Assessment

Quiz

Computers

University

Hard

Created by

Veronika Gacia

Used 16+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

text = "Maxis Oma backt Strudel."

neuer_text = text.split()

print(neuer_text)


Wie sieht der Output aus?

Maxis, Oma, backt, Strudel

['Maxis', 'Oma', 'backt Strudel.']

['Maxis', 'Oma', 'backt', 'Strudel', '.']

['Maxis', 'Oma', 'backt', 'Strudel.']

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

s = "Hallo\nIch bin ein Text\n"


Wie sehen die passenden Codezeilen zu diesem Output aus?


['Hallo\n', 'Ich bin ein Text\n']

s_new = s.splitlines()

print(s_new)

s_new = s.splitlines(True)

print(s_new)

s_new = s.split()

print(s_new)

s_new = s.split(True)

print(s_new)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

text = "Eberhardt der Schreckliche"

ergebnis = text .find("e")

print(ergebnis)


Wie lautet der Output dieses Programmes?

0

1

2

3

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

text = "Eberhardt der Schreckliche"

ergebnis = text .count("e")

print(ergebnis)


Wie lautet der Output dieses Programmes?

2

3

4

5

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

satz = "Hi, schön, dass du so fleißig, ehrgeizig und ambitioniert übst!"


OUTPUT:

['Hi,', 'schön,', 'dass du so fleißig, ehrgeizig und ambitioniert übst!']


Wie kommt es zu diesem Output?

print(satz.split(maxsplit = 2))

print(satz.split(", ",2))

print(satz.split(2))

print(satz.split(Hi, schön))

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

satz = "Halleluja, alle Jahre wieder..."

print(satz.rsplit("ll", 1))


Was wird ausgedruckt?

['Ha', 'eluja, a', 'e Jahre wieder...']

['Ha', 'eluja, alle Jahre wieder...']

['Halleluja, all', 'lle Jahre wieder...']

['Halleluja, a', 'e Jahre wieder...']

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

wort = "Meerschweinchen"

print(wort.find("e", 1, 5))


Was wird ausgedruckt?

0

1

2

3

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?