CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

University

15 Qs

quiz-placeholder

Similar activities

Arduino IDE

Arduino IDE

3rd Grade - Professional Development

17 Qs

For Loop Method in Python

For Loop Method in Python

9th Grade - University

20 Qs

Get started with python

Get started with python

University

19 Qs

Python Programming

Python Programming

University

20 Qs

Python Round 2

Python Round 2

University

10 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

Python

Python

University

10 Qs

CSE 6R Midterm Review

CSE 6R Midterm Review

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?