Stringmethoden in Python

Quiz
•
Computers
•
University
•
Hard
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
Similar Resources on Wayground
10 questions
Mastering Google Docs Formatting Skills

Quiz
•
8th Grade - University
10 questions
AutoCAD Quiz 2

Quiz
•
University
15 questions
Microsoft Word Masterclass

Quiz
•
University
8 questions
Activity - Chapter 2

Quiz
•
University
10 questions
Kuis #2 : HTML Lanjut

Quiz
•
University
10 questions
Word 2016

Quiz
•
6th Grade - University
15 questions
CNET151 Chapt 8 Encryption

Quiz
•
University
10 questions
SFC10393: Jenis-Jenis Data

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University