# Algorithm Ultimate Exam Quiz!

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
| By Kay Stibbs
K
Kay Stibbs
Community Contributor
Quizzes Created: 4 | Total Attempts: 1,688
Questions: 8 | Attempts: 581

Settings

.

• 1.

### Which of the following would instruct a robot to draw a square of side 3 units?

• A.

Forward 3, right turn 90, forward 3, right turn 90, forward 3, right turn 90,forward 3, right turn 90,

• B.

Move 3 turn 90 move 5 turn 90 move 5 turn 90 move 3 turn 90 move 3

• C.

Forward 3, forward 3, right turn right turn 90,forward 3, right turn forward 3

• D.

Forward 3, turn right forward 3, turn left, forward 3, turn right ,forward 3

A. Forward 3, right turn 90, forward 3, right turn 90, forward 3, right turn 90,forward 3, right turn 90,
Explanation
The correct answer is a series of instructions that tells the robot to move forward 3 units, then make a right turn of 90 degrees, repeat this sequence three more times. This set of instructions will result in the robot drawing a square with sides of length 3 units.

Rate this question:

• 2.

### A crane is unloading a cargo from a ship the options available to the driver are (PU) pick up container (SC) if there are still containers on the ship (MF) Move crane over free space ( LP) loop to check again (MC) move crane over the container (PD) put down container which of these will unload the ship?

• A.

MC MF LP PD PU SC

• B.

SC MC PU MF PD LP

• C.

PU LP MC PD SC MF

• D.

MC PU MF PD SC LP

B. SC MC PU MF PD LP
Explanation
The correct sequence of options to unload the ship is: SC MC PU MF PD LP. First, the driver needs to check if there are still containers on the ship (SC). If there are, the driver should move the crane over the container (MC). Then, the driver should pick up the container (PU) and move the crane over a free space (MF). Next, the driver should put down the container (PD) and loop to check again (LP) if there are still containers on the ship. This sequence ensures that the cargo is unloaded systematically and efficiently.

Rate this question:

• 3.

### A teacher is separating a class into groups by age, those 12 or above, and those less than 12. Which of the four algorithms might do this?

• A.

WHILE THERE ARE MORE PUPILS IF PUPIL AGE>= 12 PUT INTO THE ABOVE GROUP ELSE PUT INTO THE BELOW GROUP ENDIF ENDWHILE

• B.

WHILE THERE ARE MORE PUPILS IF PUPIL AGE>= 12 PUT INTO THE ABOVE GROUP ENDIF ENDWHILE

• C.

IF PUPIL AGE>= 12 PUT INTO THE ABOVE GROUP ENDIF IF PUPIL AGE< 12 PUT INTO THE BELOW GROUP ENDIF

• D.

WHILE THERE ARE MORE PUPILS IF PUPIL AGE>= 12 PUT INTO THE ABOVE GROUP ENDIF IF PUPIL AGE< 12 PUT INTO THE BELOW GROUP ENDIF ENDWHILE

A. WHILE THERE ARE MORE PUPILS IF PUPIL AGE>= 12 PUT INTO THE ABOVE GROUP ELSE PUT INTO THE BELOW GROUP ENDIF ENDWHILE
Explanation
The correct answer is the first algorithm: WHILE THERE ARE MORE PUPILS, IF PUPIL AGE>= 12, PUT INTO THE ABOVE GROUP, ELSE PUT INTO THE BELOW GROUP, ENDIF, ENDWHILE. This algorithm uses a loop to iterate through each pupil and checks their age. If the age is 12 or above, the pupil is put into the above group. Otherwise, the pupil is put into the below group. This algorithm ensures that all pupils are properly separated into the appropriate age groups.

Rate this question:

• 4.

### Display "please enter a number" Number = what the user types in If Number >=100       sales = number x 2 else        sales = number x 3 endif display sales If you enter 50 what is displayed?

• A.

100 150

• B.

150 100

• C.

100

• D.

150

D. 150
Explanation
If you enter 50, the code will check if the number is greater than or equal to 100. Since 50 is less than 100, the code will execute the else statement. Therefore, the sales will be calculated by multiplying the number (50) by 3, resulting in 150. So, the output displayed will be 150.

Rate this question:

• 5.

### A year 7 class of 20 pupils are going to make 2000 bookmarks. The bookmarks are made from Ice-lolly sticks. Each bookmark will have some sequins a pom ball and a bow. The teacher must make sure the bookmarks are finished. Which way should the teacher organize the class to make the greatest number of bookmarks in the least amount of time?

• A.

Give each pupil 100 sets of ice lollies, some sequins some pom poms and bows to make the book marks

• B.

Put all the materials together on one table and ask the class to make bookmarks

• C.

Divide the pupils into teams one team for sticking pom poms one for sticking sequins and one for sticking bows

• D.

Put the materials on separate tables and ask the class to organise themselves to make the bookmarks

C. Divide the pupils into teams one team for sticking pom poms one for sticking sequins and one for sticking bows
Explanation
Dividing the pupils into teams, with each team responsible for a specific task, will allow for simultaneous work and efficient use of time. By assigning one team to stick pom poms, one team to stick sequins, and one team to stick bows, the tasks can be completed concurrently, maximizing productivity. This method ensures that all bookmarks are being worked on simultaneously, leading to the greatest number of bookmarks being made in the least amount of time.

Rate this question:

• 6.

### The sum of the first 5 whole numbers is 15 Which is the most accurate statement?

• A.

5 + 4 + 3 + 2 + 1 = 15

• B.

( 5 + 4) + ( 3 + 2) + 1 = 15

• C.

5 + ( 4 + 3) + ( 2 + 1 ) = 15

• D.

All of the above there are multiple ways to solve this problem

D. All of the above there are multiple ways to solve this problem
Explanation
All of the above statements are accurate because there are multiple ways to solve the problem. The sum of the first 5 whole numbers can be obtained by adding the numbers in any order, as addition is commutative. Therefore, all three statements are correct ways to express the sum of the first 5 whole numbers as 15.

Rate this question:

• 7.

### This is a train track. The train goes from station A through the pedestrian crossing to station B and back to station A. There is a signal on the crossing. When it is green the train can go. When it is red the train must stop for pedestrians. The train must stop at all stations. It does this all day & all night long. Which is the correct algorithm?

• A.

W= Is the light Red?X = Is the train at Station A?Y = Is the light Green?Z = Is the train at Station B?

• B.

W= Is the train at Station A?X = Is the train at Station B?Y = Is the light Red? Z = ​Is the light Green?

• C.

W= ​Is the light Green?X = Is the light Red?Y = Is the train at Station B?Z = Is the train at Station A?

• D.

W= Is the light Red?X = Is the train at Station B?Y = ​Is the light Green?Z = Is the train at Station A?

A. W= Is the light Red?X = Is the train at Station A?Y = Is the light Green?Z = Is the train at Station B?
Explanation
The correct algorithm is W= Is the light Red?X = Is the train at Station A?Y = Is the light Green?Z = Is the train at Station B? This algorithm correctly represents the conditions and actions required for the train to operate safely. It checks if the light is red and if the train is at Station A, indicating that the train must stop for pedestrians. It also checks if the light is green and if the train is at Station B, indicating that the train can proceed.

Rate this question:

• 8.

### These animals are arranged in a pattern : scorpion, rattlesnake, penguin, octopus, monkey, lion, jaguar, iguana which would be next on the list?

• A.

Hippopotamus

• B.

Kangaroo

• C.

Giraffe

• D.

Tortoise

C. Giraffe
Explanation
The animals in the given list are arranged in alphabetical order. Starting from "scorpion," each animal is in alphabetical order with the next one. Following this pattern, "giraffe" would be the next animal on the list as it comes after "monkey" alphabetically.

Rate this question:

Related Topics