gs gs109 Python Strings - Python Strings - Quiz No.3
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: Which of the following statement prints hello\example\test.txt?
print(“hello\example\test.txt”)
print(“hello\\example\\test.txt”)
print(“hello\”example\”test.txt”)
print(“hello”\example”\test.txt”)
Question 4: Suppose s is “\t\tWorld\n”, what is s.strip()?
\t\tWorld\n
\t\tWorld\n
\t\tWORLD\n
World
Question 6: What will be the output of the “hello” +1+2+3?
hello123
hello
Error
hello6
Question 7: What will be the output of the following Python code?
>>>print("D", end = ' ') >>>print("C", end = ' ') >>>print("B", end = ' ') >>>print("A", end = ' ')
DCBA
A, B, C, D
D C B A
D, C, B, A will be displayed on four lines
Question 8: What will be the output of the following Python statement?(python 3.xx)
>>>print(format("Welcome", "10s"), end = '#') >>>print(format(111, "4d"), end = '#') >>>print(format(924.656, "3.2f"))
Welcome# 111#924.66
Welcome#111#924.66
Welcome#111#.66
Welcome # 111#924.66
Question 10: Say s=”hello” what will be the return value of type(s)?
int
bool
str
String