Python Quiz Online Test Mcqs

Python is a programming language and through this quiz, you will be able to learn various basic information about it. It contains questions answers related to its basic functionality and usage which makes this quiz not only very informative but also fun to attempt.

Python Quiz Online Test Mcqs Questions with Answers Objective Type

 

Question 1 of 20

1. Print 0xA + 0xB + 0xC ?

Question 1 of 20

Question 2 of 20

2. What is the output when following statement is executed ?

>>>"abcd"[2:]

Question 2 of 20

Question 3 of 20

3. Following set of commands are executed in shell, what will be the output?

>>>str="hello"

>>>str[:2]

>>>

Question 3 of 20

Question 4 of 20

4. What is the output of the following?

x = 'abcd'
for i in range(len(x)):
print(x)
x = 'a'

Question 4 of 20

Question 5 of 20

5. What is the return type of function id ?

Question 5 of 20

Question 6 of 20

6. What is the output when following statement is executed ?

>>>print '\x97\x98'

Question 6 of 20

Question 7 of 20

7. What is the output when following statement is executed ?

>>>print 'new' 'line'

Question 7 of 20

Question 8 of 20

8. What is the output when following statement is executed ?

>>>"a"+"bc"

Question 8 of 20

Question 9 of 20

9. What is the output of the following?

print("xyyzxyzxzxyy".count('yy'))

Question 9 of 20

Question 10 of 20

10. What is the output of the following?

x = 'abcd'
for i in x:
print(i)
x.upper()

Question 10 of 20

Question 11 of 20

11. What arithmetic operators cannot be used with strings ?

Question 11 of 20

Question 12 of 20

12. What is the output of the following?

x = 'abcd'
for i in range(x):
print(i)

Question 12 of 20

Question 13 of 20

13. What is the output when following code is executed ?

>>>str1="helloworld"

>>>str1[::-1]

Question 13 of 20

Question 14 of 20

14. The output of executing string.ascii_letters can also be achieved by?

Question 14 of 20

Question 15 of 20

15. What is the output when following code is executed ?

>>>print r"\nhello"

The output is?

Question 15 of 20

Question 16 of 20

16. What is the output of the following?

x = 'abcd'
for i in x:
print(i.upper())

Question 16 of 20

Question 17 of 20

17. Given a function that does not return any value, What value is thrown by itby default when executed in shell?

Question 17 of 20

Question 18 of 20

18. What error occurs when you execute?
apple = mango

Question 18 of 20

Question 19 of 20

19. What is the output when following code is executed ?

>>> str1 = 'hello'

>>> str2 = ','

>>> str3 = 'world'

>>> str1[-1:]

Question 19 of 20

Question 20 of 20

20. Which of these in not a core datatype?

Question 20 of 20


 

You Can Learn and Gain more Knowledge through our Online Quiz and Testing system Just Search your desired Preparation subject at Gotest.

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
error: