Completed

Class 11 CS – Strings Live Challenge

Class 11 · Computer Science Thu, 17 Sep 2026 8:00 PM 60s / question 15 questions · 15 marks

Questions From This Challenge

Q1output1 mark
What will be the output of the following Python code?
s = "Computer"
print(s[1:6])
Correct output: omput
Q2output1 mark
What will be the output of the following Python code?
s = "Python"
print(s[-1])
print(s[-4:-1])
Correct output: n tho
Q3output1 mark
What will be the output of the following Python code?
s = "Hi"
print(s * 3)
print("H" in s)
Correct output: HiHiHi True
Q4output1 mark
What will be the output of the following Python code?
s = "COMPUTER"

for ch in s:
    if ch in "AEIOU":
        print(ch, end=" ")
Correct output: O U E
Q5mcq1 mark
Which expression produces the string "HELLO WORLD"?
"hello world".lower()
"hello world".upper() ✓
"hello world".capitalize()
"hello world".title()
Q6output1 mark
What will be the output of the following Python code?
s = "python programming"
print(s.capitalize())
print(s.title())
Correct output: Python programming Python Programming
Q7output1 mark
What will be the output of the following Python code?
s = "banana"

print(s.count("a"))
print(s.find("na"))
Correct output: 3 2
Q8mcq1 mark
Which statement about find() and index() is correct?
Both return the number of occurrences of a substring
Both return the position of the first occurrence, but index() raises an error if the substring is not found ✓
find() raises an error when the substring is not found, but index() returns -1
Both always return -1 when the substring is not found
Q9output1 mark
What will be the output of the following Python code?
s = "Report2026"

print(s.isalnum())
print(s.isalpha())
print(s.isdigit())
Correct output: True False False
Q10output1 mark
What will be the output of the following Python code?
s = "Hello"

print(s.startswith("He"))
print(s.endswith("lo"))
print(s.islower())
print(s.isupper())
Correct output: True True False False
Q11output1 mark
What will be the output of the following Python code?
s = "  Python  "

print(s.strip())
print(s.lstrip())
print(s.rstrip())
Correct output: Python Python Python
Q12output1 mark
What will be the output of the following Python code?
s = "I like Java"

print(s.replace("Java", "Python"))
Correct output: I like Python
Q13output1 mark
What will be the output of the following Python code?
words = ["Python", "is", "easy"]
print(" ".join(words))
Correct output: Python is easy
Q14output1 mark
What will be the output of the following Python code?
s = "one,two,three"

parts = s.split(",")

print(parts)
print(len(parts))
Correct output: ['one', 'two', 'three'] 3
Q15output1 mark
What will be the output of the following Python code?
s = "Name:Rahul"

a, b, c = s.partition(":")

print(a)
print(b)
print(c)
Correct output: Name : Rahul
Next Live Challenge
Mixed: Tuples + Dictionary + Modules
Class 11 · Computer Science Fri, 23 Oct 2026, 8:00 PM
View Live Challenges →

← Back to Live Challenge History · Practice MCQs

CodeBuddy
Hi there! 👋 I'm CodeBuddy, your KV Coders assistant.

To help me give you the most accurate answers, please select your class and subject below, or just type your question!
Buddy is typing...