String in Python Quiz 7

Share with others

Welcome to your String in Python Quiz 7

Name
Email
School
Q61 We can access each character of a string or traverse a string using ______________
Q62. Which of the following function returns the string with first letter of every word in the string in uppercase and rest in lowercase?
Q63. Write the output of the following
s = " Hello"
print(s.find('a'))
Q64. What index value is returned by the following code?
s = "Hello"
print(s.find('l'))
Q65. Following code will return ?
s = "Hello"
print(s.count('l',2,5))
Q66. Name a function which is same as find() but raises an exception if the substring is not present in the given string.
Q67. Write the output of the following.
>>> str1 = 'Hello World! Hello 
>>> str1.index('Hee')
Q68. Write the output of the following.
>>> str1 = 'Hello World!'
>>> str1.endswith('World!')
Q69. Write the output of the following.
s = "hello 123"
print(s.islower())
Q70. Write the output of the following :
>>> str1 = 'HelloWorld!!'
>>> str1.isalnum()


Share with others

Leave a Reply