Strings Test

Name:
s = 'Good'
t = 'Time'
print('meGo' in 2 * (s + t))
False
True
What will be the output? print(ord('Good'))
GOOD
Error
71
202
What is the slice expression that displays every third character of string s, starting with the last character and proceeding backward to the first?
All of the expressions give the same result considering the sting s, except one. Identify it. s = 'Good Morning'
s[ : : 5]
s[0]+s[-1]
s[ : :-5]
s[ : :-1][: : -5]
Which of the following are true?
s[::-1][::-1] == s
s[:] == s
s[:] is s
s[::-1][::-1] is s
print( '$100 $200 $300'.count('$'), '$100 $200 $300'.count('$', 5, 10), '$100 $200 $300'.count('$', 5) )
3 1 2
3 1 0
3 1 1
3 2 1
What is the output? "asdf"+"fghh"[::-2]
'ashh'
'hh'
Error
'asdfhg'
Which of the following is true about Python Strings?
They can be changed
The strings when used with adition operator generate an error
They can be concatenated
The strings when used with the multiplication operator repeat themselves
Consider the string; str1=“Programming is fun”. The statement; str[2]='r' will give an error, is this true or false?
True
False
The statement with respect to the string declared in Q9 , the statement: str[2]==str[4] will give the answer as True.
Yes
No
{"name":"Strings Test", "url":"https://www.quiz-maker.com/QHH21CEBI","txt":"Name:, s = 'Good't = 'Time'print('meGo' in 2 * (s + t)), What will be the output? print(ord('Good'))","img":"https://www.poll-maker.com/3012/images/ogquiz.png?sz=1200-00000000001000005300"}
Powered by: Quiz Maker