Python Programming : Intermediate (Leaving Cert Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What does the str.title() method do to a string?
What does the str.title() method do to a string?
Capitalises first char of each word
Given greeting[2:7] where greeting='Hello John', what is the result?
Given greeting[2:7] where greeting='Hello John', what is the result?
llo J
What does str.find(sub) return if the substring is not found?
What does str.find(sub) return if the substring is not found?
-1
What does 'Python3'.isalnum() return?
What does 'Python3'.isalnum() return?
True
Which escape character represents a tab in Python strings?
Which escape character represents a tab in Python strings?
\t
What does the or operator return?
What does the or operator return?
True if at least one operand is true
What is the purpose of elif in conditional statements?
What is the purpose of elif in conditional statements?
Check multiple conditions
What does it mean that lists are mutable?
What does it mean that lists are mutable?
Elements can be changed after creation
What does list.pop() do when no index is specified?
What does list.pop() do when no index is specified?
Removes and returns last item
What is the difference between append() and extend()?
What is the difference between append() and extend()?
extend() adds all elements from a list
Why is incrementation crucial in while loops?
Why is incrementation crucial in while loops?
Prevents infinite loops
What is the default step value in the range() function?
What is the default step value in the range() function?
1
