Python comments

Python comments

Assessment

Interactive Video

Computers

10th Grade

Medium

Created by

Mercy Omwoyo

Used 7+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is it important for a program to have good style?


It makes the program run faster.


It makes the code clear to others.


It ensures the program is error-free.


It reduces the size of the program.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of using comments in code?


To execute additional code


To increase the speed of code execution


To leave notes about what your code is doing in plain English


To change the programming language

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are postconditions in the context of a function?


Assumptions made and what must be true before the function is called.


What should be true after the function is called.


The initial state of the system before execution.


The conditions under which a function fails.

4.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

Are you enjoying the video lesson?

Yes

No

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are preconditions in the context of a function?


Assumptions made and what must be true before the function is called.


The steps involved in executing a function.

What should be true after the function is called.


The errors that might occur during function execution.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for a multi-line comment in Python?


//


#


"""


/*

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbol is used for a single line comment in python?


//


#

/*


"""