What is a string in Python?, A loop, A sequence of characters, A condition, A number only, What does len(text) return?, The last character, The first letter, The number of characters, The position of a word, What is the first index in a Python string?, 0, -1, 10, 1, If name = "Oxford", what is len(name)?, 5, 0, 7, 6, If name = "Oxford", what is name[0]?, d, x, Oxford, O, What is the last valid index of a string?, len(text), len(text) - 1, 0, len(text) + 1, What is slicing used for?, To extract part of a string, To create a loop, To delete a program, To print numbers, In slicing text[start:end], is the end position included?, Only sometimes, Yes, No, Only with numbers, If word = "COMPUTING", what is word[0]?, O, COMPUTING, G, C, If word = "COMPUTING", what is word[3]?, M, U, P, T, If word = "COMPUTING", what is word[0:3]?, COM, PUT, OMP, COMP, If word = "COMPUTING", what is word[-1]?, C, G, N, O, What does .lower() do?, Changes text to lowercase, Removes spaces, Finds a word, Replaces text, What does .upper() do?, Counts letters, Removes characters, Changes text to uppercase, Checks errors, What does .strip() do?, Replaces numbers, Finds a character, Makes text uppercase, Removes spaces at the start and end, What does .find() return if text is not found?, Error always, -1, 1, 0, What does .replace() do?, Checks password length, Swaps text with new text, Counts characters, Deletes the whole string, Why is "Oxford" different from "oxford" in Python?, Python ignores capital letters, One is not a string, They have different lengths, Python is case-sensitive, What type of test data should the program accept?, Normal data, Wrong data, Boundary data, Invalid data, What is boundary test data?, Random data, Empty data only, Data at the edge of the rule, Data outside the rule, A username must be 5–12 characters. Is "abc" valid?, No, it is too long, Yes, because it has letters, Yes, No, it is too short, A username must not contain spaces. Is "john smith" valid?, No, Yes, Only if uppercase, Only if lowercase, What is wrong with name = "Ana" and print(name[3])?, Ana is too long, Nothing is wrong, Index 3 does not exist, Strings cannot be printed, Why should we use test cases?, To avoid using strings, To check if the program works correctly, To remove all variables, To make the code look longer, Which is a valid boundary test for a username of 5–12 characters?, abcde, abc, john smith
0%
10th - Week 3 - String Handling + Debugging
Share
Share
Share
by
Emiliojes
I-edit ang Content
I-Print kini
Embed
Uban pa
Assignments
Leaderboard
Show more
Show less
Kini nga leaderboard naka-pribado. Pag-klik sa
Share
aron himuon kini nga publiko.
Kini nga leaderboard gi-disable sa tag-iya sa resource.
Kini nga leaderboard gi-disable tungod ang imong mga kapilian lahi ra sa tag-iya sa resource.
I-revert ang mga Kapilian
Ang
Quiz
usa ka open-ended nga template. Dili kini makamugna ug mga marka sa leaderboard.
Kinahanglan mag log in
Visual style
Fonts
Subscription required
Mga Option
AI Enhanced: This activity contains content generated by AI.
Learn more.
I-switch ang template
Ipakita tanan
Daghang mga format ang mugawas samtang gidula nimo ang activity.
Open results
Copy link
QR code
Mag-delete
I-restore ang gi-autosave:
?