C programming 2019 Makeup Quiz

Quiz

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 0%

0%





Leave a Reply

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