Search Header Logo

ComProg Midterm

Authored by Joshua Abis

Information Technology (IT)

University

Used 6+ times

ComProg Midterm
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the starting index of an array in Python?

1

0

-1

Any number

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best describes a one-dimensional array?

A list containing multiple lists

A standard linear list of values

A list containing three or more lists

A nested dictionary

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the third element in an array arr?

arr[2]

arr[3]

arr(3)

arr[-3]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct keyword for an if statement in Python?

when

if

check

cond

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is used for multiple conditions in decision-making?

elseif

elif

else-if

otherwise

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to prematurely stop a loop in Python?

stop

exit

break

halt

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The continue statement is used to:

End the program

Skip the rest of the loop and go to the next iteration

Repeat the loop forever

Exit the loop immediately

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?