Search Header Logo

Programming Techniques Quiz

Authored by Lance Craswell

Computers

10th Grade

Used 1+ times

Programming Techniques Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a function and a procedure?

Functions are only used for maths

Functions return a value, procedures do not

Procedures return a value, functions do not

Functions are not reusable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does this code do? open("scores.txt", "r")

Writes to a file

Deletes a file

Opens a file for reading

Opens a file for editing

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a constant in programming?

A variable that can be changed anytime

A loop control variable

A fixed value that cannot change during execution

A random number generator

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid array operation in Python?

array.read()

append(array, item)

array.append(item)

array.join(item)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the .readline() function do?

Reads a list of integers

Reads a single line from a file

Skips a line in an array

Reads a command from the console

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why must you close a file after writing to it?

To make the program run faster

So other programs can use the file

To delete the file

To reset the contents of the file

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What symbol is used for modulus in Python?

//

%

**

==

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?