You are on page 1of 2

CSC 201

1. Python was developed by

A. Guido Van Rossum B. James Gosling C. Dennis Ritchie D. Bjarne Stroustrup

2. Python was developed in which year?

A. 1972 B. 1995 C. 1989 D. 1981

3. Python is written in which language

A. C B. C++ C. Java D. None of the above

4. What is the extension of python file?

A. .p B. .py C. . python D. None of the above

5. Python is Object-oriented programming language

A. True B. False C. Neither true or false D. None of the above

6. Python 3.0 is released in which year?

A. 2000 B. 2008 C. 2011 D. 2016

7. Which of the following statement is true?

A. Python is high level programming language B. Python is an interpreted language C. Python is an


Object Oriented language D. All of the above

8. What is used to define a block of code in Python?

A. Parenthesis B. Indentation C. Curly braces D. None of the above

9. By the use of which character, single line is made comment in Python? A.* B. # C. @ D. !

10. What is a python file with .py extension called?

A. Package B. Module C. Directory D. None of the above

11. Which of the following is incorrect variable name in Python? A. variable_1 B. variable1 C.
1variable D. _variable

12. Which of the following is not a relational operator in Python? A. >= B. <= C. = D. !=

13. Which statement is correct? A. List is immutable and Tuple is mutable B. List is mutable and
Tuple is immutable C. Both are mutable D. Both are immutable

14. Suppose a list with name arr, contains 5 elements. You can get the 2nd element from the list
using A. arr[-2] B. arr[2] C. arr[-1] D. arr[1]

15. How to get the last element of list in Python? Suppose we have list with name arr, contain 5
elements . A. arr[0] B. arr[5] C. arr[last] D. arr[-1]

16. How to copy one list to another in python? A. |1[] = |2[] B. |1[] = |2 C. |1[] = | 2[:] D. |1 = |2
17. What type of data is: arr=[(1,1),(2,2),(3,3)]? A. Array of tuples B. Tuples of list C. List of tuples D.
Invalid type

18. What is the output of the following program: print ((1,2)+(3,4)) A.(1,2),(3,4) B. (4,6) C. (1,2,3,4) D.
Invalid syntax

19. Which of the following is mutable data type? A. set B. int C. str D.

20. Which of the following is immutable data type? A. list B. set C. int D. dict

21. Which of the following is incorrect regarding variable in python? A. variable names in python
cannot start with number. However, it can contain number in any other position of variable name B.
variable names can start with an underscore C. Data type of variable names should not be declared
D. None of the above

22. Which of the following will give error? A. a=b=c B. a,b,c=1 C. a,b,c=1 "python", 1.5 D. None of the
above

23. How many keywords are there in Python 3.7? A. 32 B. 33 C. 31 D. 30

24. What is the maximum length of an Identifier in python? A. 32 B. 31 C. 63 D. None of the above

25. All keywords in python are in A. Lowercase B. Uppercase C. Both Uppercase and Lowercase D.
None of the above

26. Which of the following statement is false A. Variable name can be arbitrarily long B. They can
contain both letters and numbers C. Variable can begin with underscore D. Variable can begin with
number

27. Which of the following is a valid variable? A. Var@ B. 32var C. Class D. abc_a_c

28. Which of these is/are keyword(s)? A. in B. is C. assert D. All of the above

29. Which of the following is not used in loop in python? A. For loop B. While loop C. do-while loop
D. None of the above

You might also like