Google News
logo
Algorithm - Quiz(MCQ)
A)
best case: O(log(n)) worst case: O(n2)
B)
best case: O(n2), worst case: O(n log(n))
C)
best case: O(n log(n) ) worst case: O(n2)
D)
best case: O(n2), worst case: O(n2log(n) )

Correct Answer : Option (C) :   best case: O(n log(n) ) worst case: O(n2)

A)
Using a computer
B)
Google is computational thinking
C)
Making a computer use arti cial intelligence
D)
Developing an algorithm to solve a problem

Correct Answer : Option (D) :   Developing an algorithm to solve a problem

A)
Typing
B)
Abstraction
C)
Decomposition
D)
Algorithmic thinking

Correct Answer : Option (A) :   Typing

A)
Adding together numbers
B)
Representing real world problems in a computer program, using symbols and removing unnecessary elements
C)
Performing multiple calculations on a list of variables
D)
Taking a real world problem and designing a computer program that exactly replicates every part of that problem in the computer

Correct Answer : Option (B) :   Representing real world problems in a computer program, using symbols and removing unnecessary elements

A)
The breaking down of waste to make compost
B)
The breaking down of a problem into smaller problems
C)
The creation of music that can be played on a computer
D)
The breaking down of a program until it no longer exists

Correct Answer : Option (B) :   The breaking down of a problem into smaller problems

A)
Writing binary numbers
B)
Thinking like a computer
C)
Identifying what problems need to be solved
D)
Identifying the steps involved in solving a problem

Correct Answer : Option (D) :   Identifying the steps involved in solving a problem

A)
A problem
B)
A solution to a problem
C)
The steps that are taken to solve a problem
D)
The words to enter when typing

Correct Answer : Option (C) :   The steps that are taken to solve a problem

8 .
The following algorithm should take an input and add together two numbers, outputting the result.
 
Identify the correct algorithm
A)
num1=input("Enter the first number")
 
num2=input("Enter the second number")
 
num3=num1+num2
 
print(num3)
B)
num1=input("Enter the first number")
 
num3=input("Enter the secon number")
 
num3=num1+num2
 
print(num3)
C)
num1=input("Enter the first number")
 
num2=input("Enter the second number")
 
num3=num1+num2
 
print(num2)
D)
Num1=input("Enter the first number")
 
Num2=input("Enter the second number")
 
num3=num1+num2
 
print(Num3)

Correct Answer : Option (A) :  

num1=input("Enter the first number")
 
num2=input("Enter the second number")
 
num3=num1+num2
 
print(num3)

9 .
The following algorithm should take a numerical input, and output the 1 to 12 times table for that number.
 
Identify the correct algorithm
A)
number=input("Enter a number")
 
for x = 0 to 12
 
print(number * x)
 
next x
B)
number=input("Enter a number")
 
for x = 1 to 12
 
print(number*number)
 
next x
C)
number=input("Enter a number")
 
for x = 1 to 12
 
print(number X x)
 
next x
D)
number=input("Enter a number")
 
for x = 1 to 12
 
print(number*x)
 
next x

Correct Answer : Option (D) :  

number=input("Enter a number")
 
for x = 1 to 12
 
print(number*x)
 
next x

10 .
The following algorithm should take as input two numbers, add them together, multiply the answer by 11, add 4, then divide by 2. It should output the result. Identify the correct algorithm.
A)
number = input(“Enter a number”)
number2 = input(“Enter the second number”)
final = number + number2 +4 *11 / 2 
print (final)
B)
number = input(“Enter a number”)
number2 = input(“Enter the second number”)
final = (((number + number2) * 11) + 4) / 2 print (final)
C)
number = input(“Enter a number”)
number = input(“Enter the second number”)
final = (((number + number) * 11) + 4) / 2
print(final)
D)
number2 = input(“Enter the second number”)
final = (((number + number2) * 11) + 4) * 2 
print (final)

Correct Answer : Option (B) :  

number = input(“Enter a number”)
number2 = input(“Enter the second number”)
final = (((number + number2) * 11) + 4) / 2 print (final)