Tutorpip← About this lessonABCHide the answer keyDownload PDF
Coding · Ages 10+ · Set B
Strings
Scan to mark
on screen
B
Name
Date
Start Finish
Goal: 15 min
Score/ 12
Remember: A string is text in quotes. Plus joins strings end to end.

Questions

1
Which idea about strings is not true?
📏len tells how many characters a string has␣a space is a character too🔡len counts only the letters, not the spaces
2
Which line counts the letters in the word robot?
🔤print("Zara" + " " + "Bo")🔤print("Zara" - "Bo")🔤print(len("robot"))
3
Which line shows fifty-five?
🔤print("Zara" + "Bo")🔤print("5" + "5")🔤print("Zara" - "Bo")
4
Which idea about strings is not true?
📏len tells how many characters a string has🪄plus adds a space between strings by itself␣a space is a character too
5
Which line shows ha three times?
🔤print("ha" * 3)🔤print("Zara" - "Bo")🔤print("robot".upper())
6
Which line shows Zara and Bo with a space between?
🔤print("Zara" + " " + "Bo")🔤print("Zara" - "Bo")🔤print("Bo" + 5)
7
Which idea about strings is true?
🪄plus adds a space between strings by itself🔡len counts only the letters, not the spaces📏len tells how many characters a string has
8
Which line shows the word ROBOT in capitals?
🔤print(len("robot"))🔤print("robot".upper())🔤print("Zara" - "Bo")
9
Which line has a bug?
🔤print(5 + 5)🔤print("robot".upper())🔤print("Zara" - "Bo")
10
Which line has a bug?
🔤print(5 + 5)🔤print("Bo" + 5)🔤print(len("Zara Bo"))
11
Which line joins Zara and Bo with no space?
🔤print(len("robot"))🔤print("Zara" + "Bo")🔤print(5 + 5)
12
Which idea about strings is not true?
␣a space is a character too💭a number in quotes is still a number📏len tells how many characters a string has
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.
Answer key · Set B
Strings
1len counts only the letters, not the spaces
2print(len("robot"))
3print("5" + "5")
4plus adds a space between strings by itself
5print("ha" * 3)
6print("Zara" + " " + "Bo")
7len tells how many characters a string has
8print("robot".upper())
9print("Zara" - "Bo")
10print("Bo" + 5)
11print("Zara" + "Bo")
12a number in quotes is still a number
Mark each answer, count the right ones and write the score on the sheet.