Start learning →

CS Olympiad Python Strings Lists and Tuples — practice questions

Explore 30 free Python Strings Lists and Tuples questions in CS Olympiad Computer Science. Open each question or exercise to read its content, reference answers and available explanation.

Practise Python Strings Lists and Tuples with Quill →

Python Strings Lists and Tuples questions and exercises with answers

Showing questions 1–30 of 30.

A learner asks what a Python string really is. It is a sequence of zero or more:Read the answer and worked solution →In the Python string 'HELLO', the index of the letter H is:Read the answer and worked solution →Counting from the right hand end of a Python string, the last character has index:Read the answer and worked solution →The international standard Python uses for representing text is:Read the answer and worked solution →The unique number Unicode gives to each possible character is called a:Read the answer and worked solution →The built in function that converts a character into its code point is:Read the answer and worked solution →The built in function that converts a code point back into a character is:Read the answer and worked solution →Unicode was built as an extension of an older standard known as:Read the answer and worked solution →The original ASCII standard defined how many code points?Read the answer and worked solution →A backslash used inside a string to stand for a special character starts an:Read the answer and worked solution →Julius Caesar shifted each letter of a message by three. Such a method is a:Read the answer and worked solution →A string literal prefixed with the letter f, allowing values inside braces, is an:Read the answer and worked solution →Inside an f string, an expression written in curly braces is called a:Read the answer and worked solution →In the f string with minute:02d, the part written after the colon is a:Read the answer and worked solution →In Python, the statement message = 'Hello' makes the variable message:Read the answer and worked solution →The unique integer tied to an object, usually its memory location, is its:Read the answer and worked solution →The built in function that reports what kind of object a value is:Read the answer and worked solution →A Python list is written using comma separated values enclosed in:Read the answer and worked solution →A Python list has 50 elements. The index of its last element is:Read the answer and worked solution →The built in function that returns how many elements a list holds is:Read the answer and worked solution →An object that cannot be changed after it is created is described as:Read the answer and worked solution →A programmer needs a fixed sequence of constants that no code can alter. He should use a:Read the answer and worked solution →Catch the built in functionsRead the answer and worked solution →Pop the sequence typesRead the answer and worked solution →Run the Python gatesRead the answer and worked solution →Slice the Python termsRead the answer and worked solution →Mutable or notRead the answer and worked solution →Sort the Python ideasRead the answer and worked solution →Type the numberRead the answer and worked solution →Python bingoRead the answer and worked solution →

Worked practice questions

A learner asks what a Python string really is. It is a sequence of zero or more:

  1. Characters
  2. Statements
  3. Parameters
  4. Expressions
Show answer and solution

Correct answer: A. Characters

1. A string holds text of any length, even nothing. 2. The pieces it holds are single letters, digits or symbols. 3. So a string is a sequence of characters. _Source: OpenStax Introduction to Python Programming, Chapter 3._

Open this question →

In the Python string 'HELLO', the index of the letter H is:

  1. 5
  2. 0
  3. 1
  4. 2
Show answer and solution

Correct answer: B. 0

1. Indexes run left to right from a fixed start. 2. Python starts counting at zero. 3. So the index of H is 0. _Source: OpenStax Introduction to Python Programming, Chapter 3._

Open this question →

Counting from the right hand end of a Python string, the last character has index:

  1. -1
  2. -0
  3. -2
  4. -9
Show answer and solution

Correct answer: A. -1

1. Negative indexes count from the right. 2. They start at minus one, not minus zero. 3. So the last character is at -1. _Source: OpenStax Introduction to Python Programming, Chapter 3._

Open this question →

How to practise

  1. Choose a Python Strings Lists and Tuples question and try to work out your answer.
  2. Open the question to check the correct answer and read its worked solution.
  3. Continue in the app for bite-sized lessons, explanations and review with Quill. You can start without creating an account.

More Computer Science topics