Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 11
Computer Science
Computer Science
Strings

Question Bank

Practice Hub

Question Bank: Strings

This chapter covers strings in Python, including their creation, properties, and various operations. Understanding strings is crucial for text manipulation and programming fundamentals.

Structured practice
Question Practice

Practice chapter questions in a cleaner, exam-ready flow

Start with curated question sets, move into full module views when needed, and keep discovering related practice without losing your place in the chapter.

Question Bank - Strings

View all (86)
Q1.

What will be the output of 'Hello' + 'World!'?

Single Answer MCQ
Q-00067815
View explanation
Q2.

Which operator is used for string repetition in Python?

Single Answer MCQ
Q-00067817
View explanation
Q3.

'abc' in 'abcdef' returns what value?

Single Answer MCQ
Q-00067819
View explanation
Q4.

What does the method str.lower() do?

Single Answer MCQ
Q-00067821
View explanation
Q5.

The expression 'W' in 'Hello World!' evaluates to?

Single Answer MCQ
Q-00067823
View explanation
Q6.

Which method removes whitespace from both ends of a string?

Single Answer MCQ
Q-00067825
View explanation
Q7.

What error is raised if you call str.index('Hello') on a string that does not contain 'Hello'?

Single Answer MCQ
Q-00067827
View explanation
Q8.

What does str.replace('o', '*') return for str = 'Hello World!'?

Single Answer MCQ
Q-00067829
View explanation
Q9.

What is the primary difference between str.find() and str.index()?

Single Answer MCQ
Q-00067831
View explanation
Q10.

What will be the output of ' Hello '.strip()?

Single Answer MCQ
Q-00067833
View explanation
Q11.

If str1 = 'Python' and str2 = '-', what does str2.join(str1) return?

Single Answer MCQ
Q-00067835
View explanation
Q12.

How does the isspace() method work with the string ' '?

Single Answer MCQ
Q-00067837
View explanation
Q13.

The expression 'abc' not in 'abcdef' evaluates to?

Single Answer MCQ
Q-00067838
View explanation
Q14.

Which of the following correctly creates a string in Python?

Single Answer MCQ
Q-00067839
View explanation
Q15.

What will be the value of myString after the operation myString = 'Python' * 3?

Single Answer MCQ
Q-00067840
View explanation
Q16.

How do you access the first character of the string str1 = 'Hello'?

Single Answer MCQ
Q-00067841
View explanation
Q17.

What will be the output of print('Python'[1:4])?

Single Answer MCQ
Q-00067842
View explanation
Q18.

What is the result of the expression 'Hello' + 'World'?

Single Answer MCQ
Q-00067843
View explanation
Q19.

Which of the following is a correct way to check if 'a' is in the string 'Python'?

Single Answer MCQ
Q-00067844
View explanation
Q20.

What happens if you try to modify a character in a string str = 'abc' as str[1] = 'd'?

Single Answer MCQ
Q-00067845
View explanation
Q21.

If str1 = 'Computer', what is str1[-1]?

Single Answer MCQ
Q-00067846
View explanation
Q22.

What is the output of print('HELLO'.swapcase())?

Single Answer MCQ
Q-00067847
View explanation
Q23.

What will print('Python'[::-1]) output?

Single Answer MCQ
Q-00067848
View explanation
Q24.

What is the purpose of len() in Python regarding strings?

Single Answer MCQ
Q-00067849
View explanation
Q25.

In Python, how can you create a multi-line string?

Single Answer MCQ
Q-00067850
View explanation
Q26.

What is the output of myString = 'banana' and myString[1:4] == 'ana'?

Single Answer MCQ
Q-00067851
View explanation
Q27.

What is the consequence of executing print('ABC'.find('Z'))?

Single Answer MCQ
Q-00067852
View explanation
Q28.

If str = 'Hello World', what will str[6:] return?

Single Answer MCQ
Q-00067853
View explanation
Q29.

What is a string in Python?

Single Answer MCQ
Q-00067855
View explanation
Q30.

Which of the following methods can be used to create a multi-line string in Python?

Single Answer MCQ
Q-00067856
View explanation
Q31.

What will be the output of str1[0] if str1 = 'Hello World!'?

Single Answer MCQ
Q-00067857
View explanation
Q32.

What happens if you try to access str1[15] for str1 = 'Hello World!'?

Single Answer MCQ
Q-00067858
View explanation
Q33.

What will str1[-1] return for str1 = 'Hello World!'?

Single Answer MCQ
Q-00067859
View explanation
Q34.

Which of the following will cause a TypeError in string indexing?

Single Answer MCQ
Q-00067860
View explanation
Q35.

In Python, how do you access the second character of the string 'Python'?

Single Answer MCQ
Q-00067861
View explanation
Q36.

Which of the following statements is true regarding strings in Python?

Single Answer MCQ
Q-00067862
View explanation
Q37.

What will be the output of str1[6] if str1 = 'Hello World!'?

Single Answer MCQ
Q-00067863
View explanation
Q38.

If str1 = 'Computer Science', what does str1[-3] return?

Single Answer MCQ
Q-00067864
View explanation
Q39.

Considering the string 'Hello World!', what would str1[0:5] return?

Single Answer MCQ
Q-00067865
View explanation
Q40.

What is the result of str1[1 + 3] for str1 = 'Python'?

Single Answer MCQ
Q-00067866
View explanation
Q41.

In Python, what could happen if an incorrect index is used when accessing a string?

Single Answer MCQ
Q-00067867
View explanation
Q42.

Which of the following is NOT a valid string declaration in Python?

Single Answer MCQ
Q-00067868
View explanation
Q43.

Which character does the expression str1[-5] return if str1 = 'Programming'?

Single Answer MCQ
Q-00067869
View explanation
Q44.

When performing string operations, how does Python handle strings?

Single Answer MCQ
Q-00067870
View explanation
Q45.

What is the output of the expression str1[0] if str1 = 'Python'?

Single Answer MCQ
Q-00067871
View explanation
Q46.

What will be printed by the following code? str1 = 'Hello'; for ch in str1: print(ch, end=' ')

Single Answer MCQ
Q-00067872
View explanation
Q47.

Which of the following will raise an IndexError? str1 = 'Data'; str1[index]

Single Answer MCQ
Q-00067873
View explanation
Q48.

What will be the output of the following code? str1 = 'Hello'; print(str1[::-1])

Single Answer MCQ
Q-00067874
View explanation
Q49.

How would you access the sixth character of str1 = 'Learning'?

Single Answer MCQ
Q-00067876
View explanation
Q50.

In the context of strings, what does the term 'traversing' mean?

Single Answer MCQ
Q-00067877
View explanation
Q51.

Which of the following correctly uses a while loop to traverse a string?

Single Answer MCQ
Q-00067878
View explanation
Q52.

If str1 = 'Python Programming', what does str1.startswith('Py') return?

Single Answer MCQ
Q-00067879
View explanation
Q53.

Given str1 = 'abcabc', how can you use slicing to get 'cba'?

Single Answer MCQ
Q-00067880
View explanation
Q54.

In the following code, what will str1[index + 2] output if str1 = 'Python' and index = 0?

Single Answer MCQ
Q-00067881
View explanation
Q55.

If the string 'Hello' is assigned to str1, which operation will give you 'lo'?

Single Answer MCQ
Q-00067882
View explanation
Q56.

What does the len() function return when applied to a string?

Single Answer MCQ
Q-00067883
View explanation
Q57.

Which method would you use to convert all characters in a string to lowercase?

Single Answer MCQ
Q-00067884
View explanation
Q58.

What will be the output of 'Hello World!'.lower()?

Single Answer MCQ
Q-00067885
View explanation
Q59.

Which of the following methods checks if a string starts with a specific substring?

Single Answer MCQ
Q-00067886
View explanation
Q60.

What does the index() method return if the substring is not found?

Single Answer MCQ
Q-00067887
View explanation
Q61.

Given the string str1 = 'Hello Hello', what would str1.count('Hello') return?

Single Answer MCQ
Q-00067888
View explanation
Q62.

Which method returns a string where the first letter of each word is capitalized?

Single Answer MCQ
Q-00067889
View explanation
Q63.

What will be the output of 'Hello'.find('l',1,3)?

Single Answer MCQ
Q-00067890
View explanation
Q64.

Given str1 = 'data Science', what does str1.title() return?

Single Answer MCQ
Q-00067891
View explanation
Q65.

Which function can determine if a string ends with a specific substring?

Single Answer MCQ
Q-00067892
View explanation
Q66.

In the context of strings, what does a negative slicing step indicate?

Single Answer MCQ
Q-00067893
View explanation
Q67.

If str1 = 'Python is fun', what would str1.count('o') return?

Single Answer MCQ
Q-00067894
View explanation
Q68.

What is returned by 'Python'.index('y')?

Single Answer MCQ
Q-00067895
View explanation
Q69.

If str1 = 'Comparison', what will str1.startswith('Com') return?

Single Answer MCQ
Q-00067896
View explanation
Q70.

What will 'abcdef'.find('z') return?

Single Answer MCQ
Q-00067897
View explanation
Q71.

What is the index of the first character in a Python string?

Single Answer MCQ
Q-00067912
View explanation
Q72.

What will be the output of 'Hello'[1] in Python?

Single Answer MCQ
Q-00067913
View explanation
Q73.

What happens if you access an index out of the range of a string?

Single Answer MCQ
Q-00067914
View explanation
Q74.

Which of the following creates a string in Python?

Single Answer MCQ
Q-00067915
View explanation
Q75.

What is the result of 'Python'[-1]?

Single Answer MCQ
Q-00067916
View explanation
Q76.

How can you split a string into a list of words?

Single Answer MCQ
Q-00067917
View explanation
Q77.

If 's' is a string, what does 's.upper()' do?

Single Answer MCQ
Q-00067918
View explanation
Q78.

What does the 'partition()' method return when the separator is not found?

Single Answer MCQ
Q-00067919
View explanation
Q79.

What will be the output of the code below? str1 = 'Hello' print(str1[0:4])

Single Answer MCQ
Q-00067920
View explanation
Q80.

What is the output of 'abc' + 'def'?

Single Answer MCQ
Q-00067921
View explanation
Q81.

Which of the following will count the occurrences of 'a' in 'banana'?

Single Answer MCQ
Q-00067922
View explanation
Q82.

What does 'str.replace(old, new)' accomplish?

Single Answer MCQ
Q-00067923
View explanation
Q83.

What is the output of the following code? x = 'Python' print(x[::-1])

Single Answer MCQ
Q-00067924
View explanation
Q84.

In a string, how does one access the third character?

Single Answer MCQ
Q-00067925
View explanation
Q85.

What will be the result of executing 'abc'.split('b')?

Single Answer MCQ
Q-00067926
View explanation
Q86.

How can you check if a string contains a specific substring?

Single Answer MCQ
Q-00067927
View explanation
Learn Better On The App
Free learning flow

Learn Without Limits

Access NCERT content for free with a cleaner, faster way to revise every day.

Chapter summaries
Revision tools

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview