Unit 1 Introduction to Python

5th semester New Syllabus

Introduction to Python

1 / 16

what will be the output of the following code?

# This is a comment

print("Hello, World!") # This is another comment

2 / 16

What symbol is used to start a comment in Python?

3 / 16

What is the purpose of Python Enhancement Proposals (PEPs)?

4 / 16

Which of the following is true about Python's memory management?

5 / 16

Python is an example of which type of programming language?

 

6 / 16

Which of the following is a key feature of Python that makes it easy to read and understand?

7 / 16

Which of the following best describes tokens in Python?

8 / 16

Which of the following tokens is a literal?

9 / 16

Which of the following lines of code is a correctly formatted block with an if statement?

a. if x > 0:
print("Positive number")
print("Checked number")

 

b. if x > 0:
print("Positive number")
print("Checked number")

c. if x > 0:
print("Positive number")
print("Checked number")

d. if x > 0:
print("Positive number")

10 / 16

What is the purpose of the pass keyword in Python?

11 / 16

Which of the following is NOT a valid identifier in Python?

12 / 16

What will be the output of the following code with a multi-line comment?

"""
This is a multi-line comment
"""
print("Hello, World!")

13 / 16

Identify the token type of the following snippet: "Hello, World!"

14 / 16

Identify the token type of the following snippet: +

 

15 / 16

Which of the following tokens is a keyword in Python?

16 / 16

Which of the following is NOT considered a token in Python?

Your score is

The average score is 69%

0%


python chapter 1 (1)python chapter 1 (2)python chapter 1 (3)python chapter 1 (4)python chapter 1 (5)python chapter 1 (6)python chapter 1 (7)python chapter 1 (8)python chapter 1 (9)python chapter 1 (10)python chapter 1 (11)python chapter 1 (12)python chapter 1 (13)python chapter 1 (14)python chapter 1 (15)python chapter 1 (16)python chapter 1 (17)python chapter 1 (18)python chapter 1 (19)python chapter 1 (20)python chapter 1 (21)python chapter 1 (22)python chapter 1 (23)python chapter 1 (24)python chapter 1 (25)python chapter 1 (26)python chapter 1 (27)python chapter 1 (28)

Leave a Reply

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