gs gs109 Python Strings - Python Strings - Quiz No.1
gs gs109 Python Quiz
This quiz belongs to book/course code gs gs109 Python of gs organization. We have 134 quizzes available related to the book/course Python. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Python Strings. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
Question 3: The output of executing string.ascii_letters can also be achieved by:
string.ascii_lowercase_string.digits
string.ascii_lowercase+string.ascii_uppercase
string.letters
string.lowercase_string.uppercase
Question 5: What arithmetic operators cannot be used with strings?
+
*
–
All of the mentioned
Question 6: What will be the output of the following Python code?
>>>print (r"\nhello")
a new line and hello
\nhello
the letter r and then hello
error
Question 7: What will be the output of the following Python statement?
>>>print('new' 'line')
Error
Output equivalent to print ‘new\nline’
newline
new line
Question 8: What will be the output of the following Python statement?
>>> print('x\97\x98')
Error
97 98
x\97
\x97\x98
Question 9: What will be the output of the following Python code?
>>>str1="helloworld" >>>str1[::-1]
dlrowolleh
hello
world
helloworld
Question 10: What will be the output of the following Python code?
print(0xA + 0xB + 0xC)
0xA0xB0xC
Error
0x22
33