
Understanding Selection in Pseudocode

Quiz
•
Computers
•
11th Grade
•
Hard
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
Similar Resources on Wayground
13 questions
Fundamentals of Python

Quiz
•
9th - 12th Grade
10 questions
Conditional statements in python

Quiz
•
11th - 12th Grade
10 questions
Python Exception Handling

Quiz
•
10th - 12th Grade
10 questions
Programming - Selection in an Algorithm

Quiz
•
1st - 11th Grade
10 questions
AP Computer Science-Quiz 2(G10)

Quiz
•
9th - 12th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches

Quiz
•
10th - 11th Grade
10 questions
Python Basics

Quiz
•
11th Grade
12 questions
asesmen informatika fase F

Quiz
•
11th Grade
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade