Python Quiz Online Test Mcqs

Test Instructions

Test Name : Python MCQs
Subject : Computer General
Test Type : Mcqs
Total Question : 20
Total Marks : 40
Total Time : 20 Minutes

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

  • Uncategorized
 

Question 1 of 20

Uncategorized

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

>>>print '\x97\x98'

Question 1 of 20

Question 2 of 20

2. What is the output of the following?

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

Question 2 of 20

Question 3 of 20

3. What is the output of the following?

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

Question 3 of 20

Question 4 of 20

4. What is the output of the following?

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

Question 4 of 20

Question 5 of 20

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

>>>"a"+"bc"

Question 5 of 20

Question 6 of 20

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

>>>print 'new' 'line'

Question 6 of 20

Question 7 of 20

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

>>>str1="helloworld"

>>>str1[::-1]

Question 7 of 20

Question 8 of 20

8. What is the output of the following?

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

Question 8 of 20

Question 9 of 20

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

>>>"abcd"[2:]

Question 9 of 20

Question 10 of 20

10. What is the output of the following?

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

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 error occurs when you execute?
apple = mango

Question 12 of 20

Question 13 of 20

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

>>> str1 = 'hello'

>>> str2 = ','

>>> str3 = 'world'

>>> str1[-1:]

Question 13 of 20

Question 14 of 20

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

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. The output of executing string.ascii_letters can also be achieved by?

Question 16 of 20

Question 17 of 20

17. Which of these in not a core datatype?

Question 17 of 20

Question 18 of 20

18. What is the return type of function id ?

Question 18 of 20

Question 19 of 20

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

Question 19 of 20

Question 20 of 20

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

>>>str="hello"

>>>str[:2]

>>>

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.

Check Other Related Topics

One comment

  1. Sir air ka result 20 july ko ana tha net pay naii aya abii tk kayo

Leave a Reply

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