📝
Logic Building - Phase 5: Strings
Master string manipulation, character operations, and word-level logic
50 questions•5 pages•~75 min
Progress: 0 / 500%
Page 1 of 5 • Questions 1-10 of 50
Q1easy
What will be printed? s = "Hello" print(len(s))
Q2easy
What is the output?
s = "Python"
print(s[::-1])Q3medium
What will be printed? s = "Hello World" count = 0 for ch in s: if ch.isupper(): count += 1 print(count)
Q4medium
What does this code check? s = "racecar" if s == s[::-1]: print("Palindrome")
Q5easy
What is the result?
s = "Hello"
print(s[0] + s[-1])Q6easy
What will be printed? s = "Python" print(s.upper())
Q7easy
What is the output?
s = "Hello World"
print(s.split())Q8easy
What will be printed? s = "programming" print(s.count("m"))
Q9easy
What is the result?
s = "Hello"
print(s.replace("l", "L"))Q10easy
What will be printed? s = " Python " print(s.strip())
...