CS1010 Lab 03

CS1010 Lab 03

University

10 Qs

quiz-placeholder

Similar activities

Plot the Code

Plot the Code

University

10 Qs

Python Basics

Python Basics

University

10 Qs

Third Year Placement Training Revision Test

Third Year Placement Training Revision Test

University

10 Qs

C# Structured, Selection and Iteration

C# Structured, Selection and Iteration

9th Grade - University

15 Qs

Python list starter

Python list starter

10th Grade - University

12 Qs

Quiz Algoritma Looping

Quiz Algoritma Looping

University

15 Qs

Quiz 2

Quiz 2

University

10 Qs

Java

Java

University

15 Qs

CS1010 Lab 03

CS1010 Lab 03

Assessment

Quiz

Computers

University

Medium

Created by

Gabriella Gloria

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following assertions is true when the loop terminates?

{ x == -1 }

{ x <= -1 }

{ x == n }

{ x > 0 }

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What can be asserted at Line A?

{ y == (x - 2) * (x - 2) }

{ y == x * x }

{ y == (x + 2) * (x + 2) }

{ y == x * x - 4 }

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

1 2 3

1 2

2 3

1 2 3 4

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet?

5 4 3 2 1 0

5 4 3 2 1

4 3 2 1 0

4 3 2 1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code?

121212

123123

123123123

1212

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the value of sum after the loop?

18

10

12

14

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

1 2 3 4

1 3

2 4

1 2 3

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?