0% found this document useful (0 votes)
6 views3 pages

Python Programming Basics Quiz

The document contains a series of questions and answers related to Python programming, covering topics such as programming paradigms, case sensitivity, keywords, code blocks, anonymous functions, operator precedence, and variable naming conventions. Key answers include that Python supports object-oriented, structured, and functional programming, is case sensitive, and uses indentation to define code blocks. Additionally, it discusses the order of precedence for operations and identifies the truncation division operator.

Uploaded by

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

Python Programming Basics Quiz

The document contains a series of questions and answers related to Python programming, covering topics such as programming paradigms, case sensitivity, keywords, code blocks, anonymous functions, operator precedence, and variable naming conventions. Key answers include that Python supports object-oriented, structured, and functional programming, is case sensitive, and uses indentation to define code blocks. Additionally, it discusses the order of precedence for operations and identifies the truncation division operator.

Uploaded by

babbba48
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

1. Which type of programming does Python support?

a) Object-oriented programming

b) structure programming

c) functional programming

d) All of these

Ans. d

2. Is Python case sensitive when dealing with identifiers?

a) no

b) yes

c) Machine dependent

d) None of these

Ans. b

3. All keywords in Python are in ________

a) Capitalized

b) lower case

c) UPPER CASE

d) None of these

Ans. d

4. Which of the following is used to define a block of code in Python language?

a) Indentation

b) Key

c) Brackets

d) All of these

Ans. a

5. Python supports the creation of anonymous functions at runtime, using a


construct called ____

a) pi

b) anonymous

c) lambda

d) none of these
Ans. c

6. Which one of the following has the same precedence level?

a) Addition and Subtraction

b) Multiplication, Division and Addition

c) Multiplication, Division, Addition and Subtraction

d) Addition and Multiplication

Ans. a

7. Which one of the following has the highest precedence in the expression?

a) Exponential

b) Addition

c) Multiplication

d) Parentheses

Ans. d

8. Which of these in not a core data type?

a) Lists

b) Dictionary

c) Tuples

d) Class

Ans. d

9. What is the order of precedence in python?

a) Exponential, Parentheses, Multiplication, Division, Addition, Subtraction

b) Exponential, Parentheses, Division, Multiplication, Addition, Subtraction

c) Parentheses, Exponential, Multiplication, Division, Subtraction, Addition

d) Parentheses, Exponential, Multiplication, Division, Addition, Subtraction

Ans. d

10. Which of the following is true for variable names in Python?

a) underscore and ampersand are the only two special characters allowed

b) unlimited length

c) all private members must have leading and trailing underscores

d) none of the mentioned


Ans. b

11. Operators with the same precedence are evaluated in which manner?

a) Left to Right

b) Right to Left

c) Can’t say

d) None of the mentioned

Ans. a

12. Which of the following is the truncation division operator in Python?


a) |

b) //

c) /

d) %

Ans. b

You might also like