Quiz 4 Week 6 Repetition Structures (For)

Quiz 4 Week 6 Repetition Structures (For)

University

15 Qs

quiz-placeholder

Similar activities

Python Programming

Python Programming

5th Grade - University

15 Qs

Arithmetic Types Declare Initialize Relation Logical Ops

Arithmetic Types Declare Initialize Relation Logical Ops

9th Grade - University

16 Qs

Python Programming

Python Programming

University

10 Qs

Java Control and Loop -2

Java Control and Loop -2

University

20 Qs

PLD_Semi-Final Quiz SAT

PLD_Semi-Final Quiz SAT

University

20 Qs

GirlsWhoML Workshop 0

GirlsWhoML Workshop 0

University

20 Qs

Array

Array

University

10 Qs

Python Loops

Python Loops

University

17 Qs

Quiz 4 Week 6 Repetition Structures (For)

Quiz 4 Week 6 Repetition Structures (For)

Assessment

Quiz

Computers

University

Hard

Created by

Parkpoom TA

Used 4+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 What is a result of the following program?

Your item is 5

Your item is 5

Your item is 5

Your item is 5

Your item is 4

Your item is 3

Your item is 5

Your item is 5

Your item is 3

Your item is 4

Your item is 5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 Which line of code define an incremental of the index?

2

4

6

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 Insert code at line 5 to make this program run as follows.

num = -1

num -= 1

num += 1

num = 1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Insert code at line 3 to make this program run as the output.

if num % 2 == 1:

if num / 2 == 0:

if num % 2 == 0:

if num == 0:

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

 How many lines will be printed in this program?

50 Lines

20 Lines

Infinite Line

Error!

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many lines will be printed in this program?

Error!

1 Line

10 Lines

Infinitely running loop

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

1

5 4 3 2 1

1 2 3 4 5

None of the above

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?