CSE 102 Exam 2 Practice

CSE 102 Exam 2 Practice

University

15 Qs

quiz-placeholder

Similar activities

JS IF ELSE FOR LOOPS

JS IF ELSE FOR LOOPS

University

13 Qs

CO - 2_ Quiz 1_Python Conditionals

CO - 2_ Quiz 1_Python Conditionals

10th Grade - University

15 Qs

CC102 - Repetition Control Structures

CC102 - Repetition Control Structures

University

10 Qs

Algo Quiz

Algo Quiz

University

16 Qs

Python Basics

Python Basics

University

15 Qs

Q4 - Comp Vision (FUNCTION)

Q4 - Comp Vision (FUNCTION)

University

10 Qs

Python Basics 4

Python Basics 4

University

20 Qs

Software Testing-01

Software Testing-01

University

20 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?