Python lists and strings

Chalkplay teamComputingGrades 9–127 questionsTeam board makerEnglish
Copy & edit
Team board
134568101112Team 115Team 220Team 310

Game options Saved per activity

For Team board. Sound and theme change straight away; other options start the game again.

Questions and answers

· 7 questionsShow answers
  1. 1. nums = [4, 7, 1]. What does print(nums[0]) show?
    • Correct answer: 4
    • 7
    • 1
    • [4]
  2. 2. What does print(len([4, 7, 1])) show?
    • Correct answer: 3
    • 2
    • 12
    • 1
  3. 3. What does print('cat'.upper()) show?
    • Correct answer: CAT
    • Cat
    • cat
    • C
  4. 4. What does print('hello'[1]) show?
    • Correct answer: e
    • h
    • l
    • hello
  5. 5. What does print([1, 2] + [3]) show?
    • Correct answer: [1, 2, 3]
    • [1, 5]
    • 6
    • [3, 1, 2]
  6. 6. What does print('ab' * 3) show?
    • Correct answer: ababab
    • ab3
    • aaabbb
    • An error
  7. 7. x = [5, 2, 9], then x.sort(). What does print(x) show?
    • Correct answer: [2, 5, 9]
    • [9, 5, 2]
    • [5, 2, 9]
    • None

Leaderboard

No scores yet. Play it live and the class's scores appear here.