0% found this document useful (0 votes)
42 views

LECT 5 Python

The document contains 18 multiple choice questions that test knowledge of Python syntax, features, implementations and libraries. It covers topics like print syntax in Python 2 vs 3, whether Python is case sensitive, whether it is compiled or interpreted, performance compared to C, bytecode production, CPython, PyPy, NumPy and static vs dynamic typing. The questions have a single correct answer each and test fundamental Python concepts.

Uploaded by

martiin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

LECT 5 Python

The document contains 18 multiple choice questions that test knowledge of Python syntax, features, implementations and libraries. It covers topics like print syntax in Python 2 vs 3, whether Python is case sensitive, whether it is compiled or interpreted, performance compared to C, bytecode production, CPython, PyPy, NumPy and static vs dynamic typing. The questions have a single correct answer each and test fundamental Python concepts.

Uploaded by

martiin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

QUIZ- Test Your Skills

1. What is the correct syntax of print statement in


Python 2.x ?

A. print
B. print()
C. Print()
D. Print

Correct Answer: A
QUIZ- Test Your Skills

2. What is the correct syntax of print function in


Python 3.x ?

A. print
B. print()
C. Print()
D. Print

Correct Answer: B
QUIZ- Test Your Skills

3. Python is case sensitive

A. False
B. True

Correct Answer: B
QUIZ- Test Your Skills

4. Python is a compiled language or interpreted


language ?

A. Compiled Language
B. Interpreted Language
C. Both
D. None Of The Above

Correct Answer: C
QUIZ- Test Your Skills

5. A Python code is normally smaller than the


corresponding C language code

A. True
B. False

Correct Answer: A
QUIZ- Test Your Skills

6. A Python code runs faster than the corresponding C


language code

A. True
B. False

Correct Answer: B
QUIZ- Test Your Skills

7. What kind of code Python compiler produces ?

A. Machine Code
B. Secret Code
C. Source Code
D. Byte Code

Correct Answer: D
QUIZ- Test Your Skills

8. What is CPython ?

A. A Python Library
B. Name Of Python Framework
C. A Python language Implementation
D. None Of The Above

Correct Answer: C
QUIZ- Test Your Skills

9. In CPython , the bytecode is converted to machine


instruction set by

A. PVM
B. VM
C. JVM
D. Bytecode Converter

Correct Answer: A
QUIZ- Test Your Skills

10.Python 3 is backward compatible with Python 2

A. True
B. False

Correct Answer: B
QUIZ- Test Your Skills

11. Support for Python 2 will end on

A. 31-Jan-2019
B. 1-Jan-2020
C. 31-Dec-2018
D. 31-Dec-2019

Correct Answer: B
QUIZ- Test Your Skills

12. Arrange the following in descending order of speed


of execution

A. CPython , PyPy, C
B. PyPy, C, CPython
C. CPython , C, PyPy
D. C,PyPy,CPython

Correct Answer: D
QUIZ- Test Your Skills

13. Which implementation of Python contains JITC ?

A. CPython
B. PyPy
C. Jython
D. IronPython

Correct Answer: B
QUIZ- Test Your Skills

14. What is the output of 10/4 in Python 3?

A. 2.0
B. 2.5
C. 2
D. None Of The Above

Correct Answer: B
QUIZ- Test Your Skills

15. What is the output of print “Python Rocks” in


Python 3 ?

A. Python Rocks
B. Python
C. Syntax Error
D. None Of The Above

Correct Answer: C
QUIZ- Test Your Skills

16. Which of the following is not a Python IDE ?

A. PyCharm
B. Cutie Pie
C. Spyder
D. Visual Studio Code

Correct Answer: B
QUIZ- Test Your Skills

17. What is NumPy?

A. A library of Python for working with large and


multidimensional arrays
B. A library of Python for Artificial Intelligence
C. A Python IDE
D. None of the above

Correct Answer: A
QUIZ- Test Your Skills

18. Python is a statically typed language

A. True
B. False

Correct Answer: B

You might also like