Understanding Selection in Pseudocode

Understanding Selection in Pseudocode

11th Grade

9 Qs

quiz-placeholder

Similar activities

Pseudocode Keywords

Pseudocode Keywords

11th Grade - University

14 Qs

Java Boolean Statements

Java Boolean Statements

11th Grade

11 Qs

Dasar-Dasar Algoritma

Dasar-Dasar Algoritma

10th - 12th Grade

10 Qs

W8-11

W8-11

10th - 11th Grade

10 Qs

Python Nested Conditionals

Python Nested Conditionals

11th Grade

10 Qs

Arduino - Exercise 5 Simple Digital Input

Arduino - Exercise 5 Simple Digital Input

11th Grade

10 Qs

C++ Basics Quiz

C++ Basics Quiz

9th - 12th Grade

10 Qs

Conditionals - codeHS mod4

Conditionals - codeHS mod4

9th - 12th Grade

10 Qs

Understanding Selection in Pseudocode

Understanding Selection in Pseudocode

Assessment

Quiz

Computers

11th Grade

Hard

Created by

Suraj Motee

FREE Resource

9 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What will be the output for x = -4 and y = 7? DECLARE x, y: INTEGER INPUT x, y IF x > 0 THEN IF y > 0 THEN OUTPUT "First Quadrant" ELSE OUTPUT "Fourth Quadrant" ENDIF ELSE IF y > 0 THEN OUTPUT "Second Quadrant" ELSE OUTPUT "Third Quadrant" ENDIF ENDIF

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

What will be the output for x = 0 and y = -5? DECLARE x, y : INTEGER INPUT x, y IF x = 0 THEN IF y = 0 THEN OUTPUT "Point is at the origin" ELSE OUTPUT "Point lies on the Y-axis" ENDIF ELSE IF y = 0 THEN OUTPUT "Point lies on the X-axis" ELSE OUTPUT "Point is not on any axis" ENDIF ENDIF

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

What will be the output when x = 15? DECLARE x : INTEGER INPUT x IF x >= 10 AND x <= 20 THEN OUTPUT "x is in the range 10-20" ELSE OUTPUT "x is out of range" ENDIF

Evaluate responses using AI:

OFF

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Complete the pseudocode below to check if a number is positive, negative or zero. DECLARE num : INTEGER INPUT num IF num ___ 0 THEN OUTPUT "The number is positive" ELSE IF num __ 0 THEN OUTPUT "The number is negative" ELSE OUTPUT __________________ ENDIF ENDIF

greater than

less than

equal to

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Complete the pseudocode to check if a number is a multiple of another number. DECLARE num1, num2 : INTEGER INPUT num1, num2 IF num1 MOD num2 __ 0 THEN OUTPUT num1, " is a multiple of " , num2 ELSE OUTPUT num1, " is not a ______________ ", _________ ENDIF

multiple

divisor

6.

OPEN ENDED QUESTION

3 mins • 1 pt

Complete the pseudocode below that reads the lengths of 3 sides of a triangle from the user and display a message indicating the type of the triangle. DECLARE side1, side2, side3 : __ INPUT __, __, __ IF __ = __ AND __ = __ THEN OUTPUT "__" ELSE IF __ = __ OR __ = __ OR __ = __ THEN OUTPUT "__" ELSE OUTPUT "__" ENDIF ENDIF

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

3 mins • 1 pt

You are writing a program that checks whether the entered character is a number, a lowercase letter, or an uppercase letter. If the user enters a digit (0-9), the program should display a message indicating that the entered character is a digit. If the entered character is a lowercase letter, the program should display a message indicating that it is a lowercase letter. If the entered character is an uppercase letter, the program should display a message indicating that it is an uppercase letter. If the entered character is anything else, the program should indicate that the entered character is not a letter or digit. DECLARE character : __ INPUT __ IF __ >= "0" AND __ <= "9" THEN OUTPUT "__" ELSE IF __ >= "a" AND __ <= "z" THEN OUTPUT "__" ELSE IF __ >= "A" AND __ <= "Z" THEN OUTPUT "__" ELSE OUTPUT "__" ENDIF END IF ENDIF

Evaluate responses using AI:

OFF

8.

OPEN ENDED QUESTION

3 mins • 1 pt

Complete the program that reads a wavelength from the user and reports the color corresponding to the wavelength. If the wavelength entered by the user is outside of the visible spectrum, display an error message. DECLARE wavelength : INTEGER INPUT wavelength CASE OF wavelength ______ TO ______ : OUTPUT "Violet" ______ TO ______ : OUTPUT "Blue" ______ TO ______ : OUTPUT "Green" ______ TO ______ : OUTPUT "Yellow" ______ TO ______ : OUTPUT "Orange" ______ TO ______ : OUTPUT "Red" OTHERWISE : OUTPUT "Error: Wavelength outside visible spectrum" END CASE

Evaluate responses using AI:

OFF

9.

OPEN ENDED QUESTION

3 mins • 1 pt

Complete the pseudocode below. DECLARE score AS INTEGER INPUT score IF score ______ 90 THEN OUTPUT "A" ELSE IF score ______ 75 AND score ______ 89 THEN OUTPUT "B" ELSE IF score ______ 50 AND score ______ 74 THEN OUTPUT "C" ELSE IF score ______ 35 AND score ______ 49 THEN OUTPUT "D" ELSE IF score ______ 0 AND score ______ 34 THEN OUTPUT "F" ELSE OUTPUT "Error: Invalid score" END IF END IF END IF END IF END IF

Evaluate responses using AI:

OFF

Discover more resources for Computers