CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

University

15 Qs

quiz-placeholder

Similar activities

DECISION MAKING IN C

DECISION MAKING IN C

University

10 Qs

[AP CSP] FOR & WHILE LOOPS

[AP CSP] FOR & WHILE LOOPS

9th Grade - University

20 Qs

Java MCQ Test on Control Statements

Java MCQ Test on Control Statements

University

10 Qs

Python Lists and Tuples

Python Lists and Tuples

University

11 Qs

Week 6 Quiz

Week 6 Quiz

University

20 Qs

Conditional and Iterative Statements

Conditional and Iterative Statements

University

10 Qs

Ex - Python Control Statements

Ex - Python Control Statements

University

12 Qs

Q2 - Comp Vision

Q2 - Comp Vision

University

10 Qs

CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

Assessment

Quiz

Computers

University

Hard

Created by

Tyler Lovell

Used 58+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to add an element to the end of a list in Python? (And only to the end of the list)

list.insert()

`list.append()`

`list.add()`

`list.extend()`

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will be the output of the code snippet?

Hello

World

World!

, Worl

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times will i be printed?

4 times

5 times

6 times

0 times

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

Which option below converts the while loop to a for loop?

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about nested loops?

Only for loops can be nested.

Only while loops can be nested.

Both for and while loops can be nested.

Nested loops are not allowed in Python.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output of the code?

0:1

0:2

0:3

1:1

1:2

1:3

1:0

1:1

2:0

2:1

1:0

1:1

1:2

2:0

2:1

2:2

3:0

3:1

3:2

0:1

1:1

0:2

1:2

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is more suitable for iterating over a list when the number of iterations is known?

for loop

while loop

do-while loop

foreach loop

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?