Completed

Class 11 CS – String Functions & Methods

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

Questions From This Challenge

Q1mcq1 mark
What will be the output? s = "COMPUTER" print(s[1:7:2], s[-2::-3])
OPT EPC ✓
OPU EPC
OPT ETR
OMT EPC
Q2mcq1 mark
What will be the output? s = "programming" print(s.count("r"), s.find("gram"), s.index("ming"))
2 3 7 ✓
2 3 6
2 4 7
1 3 7
Q3mcq1 mark
What will be the output? s = "Python" print(s[:3] + s[-2:] * 2)
Pythonon
Pythth
Pytonon ✓
Pyth
Q4mcq1 mark
What will be the output? s = " Data Science " print(len(s), len(s.strip()), len(s.lstrip()))
16 12 14 ✓
16 12 13
17 12 14
16 13 14
Q5mcq1 mark
What will be the output? s = "banana" s = s.replace("a", "o") print(s, s.count("o"))
bonono 3 ✓
bonono 4
banono 3
bonana 2
Q6mcq1 mark
What will be the output? s = "Python Programming" print(s.lower().count("p"), s.upper().startswith("PY"))
2 True ✓
3 True
2 False
3 False
Q7mcq1 mark
What will be the output? s = "abc123" print(s.isalnum(), s.isalpha(), s.isdigit())
True False False ✓
True True False
False True True
False False True
Q8mcq1 mark
What will be the output? s = "HELLO123" print(s.isupper(), s.islower(), s.isalpha())
True False False ✓
True False True
False True False
False False True
Q9mcq1 mark
What will be the output? s = "Python:Programming:Language" x = s.partition(":") print(x[0], x[2])
Python Programming
Python Programming:Language ✓
Python:Programming Programming:Language
Python Language
Q10mcq1 mark
What will be the output? s = "one,two,,four" x = s.split(",") print(len(x), x[2])
3 two
4 empty string ✓
4 two
3 empty string
Q11mcq1 mark
What will be the output? s = "abcabcabc" print(s.find("abc", 1))
0
1
3 ✓
-1
Q12mcq1 mark
What will be the output? s = "MISSISSIPPI" print(s.count("SS"), s.find("ISS"), s.rfind("ISS"))
2 1 4 ✓
2 1 5
2 2 4
3 1 4
Q13mcq1 mark
What will be the output? s = "Computer" result = "" for ch in s: if ch.lower() in "aeiou": result += ch.upper() print(result)
OUE ✓
OUEE
OU
OUEr
Q14mcq1 mark
What will be the output? s = "Python" result = "" for i in range(len(s)): if i % 2 == 0: result += s[i] print(result.upper())
Pto
PTH
PTO ✓
YHN
Q15output1 mark
What will be the output?
s = "  Python Programming  "
s = s.strip().replace("Python", "Java")
print(s.title())
Correct output: Java Programming
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...