wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

2025 Logical test

Total questions: 30

Worksheet time: 30mins

Name
Class
Date
1.

What does the following Java code output?

a)

15

b)

17

c)

16

d)
Error
2.

What will be the output of the following PHP code?

a)
510 cars
b)
5+10 cars
c)

15

d)
Error
3.

What will be the output of the following Python code?

a)
[1, 2, 3]
b)
[1, 2, 3, 4]
c)
[1, 2, 7]
d)
Error
4.

What is the output of the following JavaScript code?

a)
a is false
b)
a is true
c)
Error
d)
No output
5.

What is the output of the following C# code?

a)

", Wor"

b)
" Worl"
c)
"World"
d)
Index Error
6.

What will the following Python code output?

a)

1 , 5 , 10

b)

1 , 5 , 15

c)

1 , 15

d)

Error

7.

What does the following SQL query return? SELECT COUNT(*) FROM employees WHERE department_id IS NULL;

a)
The number of employees with a department_id
b)
The number of employees without a department_id
c)
All employees
d)
No output
8.

What will be the output of the following SQL query? SELECT IFNULL(NULL, 'Hello');

a)
NULL
b)
Hello
c)
" "
d)
Error
9.

What will be the output of the following SQL query? SELECT * FROM orders ORDER BY order_date DESC LIMIT 1;

a)
The first order by date.
b)
The last order by date.
c)
The first order in the table.
d)
The last order in the table.
10.
Which type of JOIN would you use to include all rows from the left table and only matching rows from the right table?
a)
INNER
b)
RIGHT
c)
LEFT
d)
OUTER APPLY
11.

Identify the error in the following SQL statement: SELECT department, COUNT(*) FROM employees WHERE salary > 50000 GROUP BY department HAVING COUNT(*) > 5;

a)
There is no error.
b)
The WHERE clause should be after the GROUP BY clause.
c)
The HAVING clause should be before the GROUP BY clause.
d)
COUNT(*) cannot be used in HAVING clause.
12.
How do you change a column value in a table?
a)
ALTER TABLE table_name SET column_name = new_value WHERE condition
b)
MODIFY TABLE table_name SET column_name = new_value WHERE condition
c)
UPDATE table_name SET column_name = new_value WHERE condition
d)
CHANGE TABLE table_name SET column_name = new_value WHERE condition
13.
A pie chart shows the distribution of tasks in a software development project: Coding (40%), Testing (30%), Documentation (20%), Design (10%). If the project consists of 200 tasks, how many tasks are dedicated to testing?
a)

40

b)

50

c)

60

d)

70

14.
Identify the missing number in the series: 3, 7, 15, 31, ___?
a)

62

b)

63

c)

64

d)

65

15.
If it takes 5 machines 5 minutes to make 5 widgets, how long would it take 100 machines to make 100 widgets?
a)
1 Min
b)
5 Mins
c)
10 Mins
d)
2 Mins
16.
Two mothers and two daughters went out to eat. Everyone ate one burger, yet only three burgers were eaten. How is this possible?
a)
One person didn't eat
b)
One person ate two burgers
c)
They are one grandmother, one mother, and one daughter
d)
They shared the burgers
17.

If you rearrange the letters "AGNOM" you would have the name of a(n):

a)
Country
b)
Fruit
c)
Ocean
d)
Animal
18.
A man walks 3 miles south, 3 miles east, and 3 miles north. How far is he from his starting point?
a)
0 Miles
b)
3 Miles
c)
6 Miles
d)
9 Miles
19.
Identify the error in the following sentence: "Each of the boys have their own locker."
a)
Each of the boys
b)
their
c)
No Error
d)
have
20.
Which sentence uses the correct form of the adjective?
a)
She is the more beautiful of the two sisters.
b)
She is the most beautiful of the two sisters.
c)
She is the beautifulest of the two sisters.
d)
She is the more beautifulest of the two sisters.
21.
Choose the correct verb tense: "She ___ her homework before she went to the party."
a)
finishes
b)
has finished
c)

have finished

d)
had finished
22.
Choose the correct form of the verb: "He ___ at the library every evening."
a)
studies
b)
study
c)
studying
d)
studied
23.
Choose the correct form of the verb: "Neither of the answers ___ correct."
a)
are
b)
were
c)
be
d)
is
24.
Choose the correct preposition: "He is similar ___ his father in many ways."
a)
to
b)
with
c)
as
d)
like
25.
What is the value of y in the equation 7 − 2y = 1 ?
a)

3

b)

-3

c)

2

d)

-2

26.
Simplify: 4(x − 1) + 2x
a)
6x - 4
b)
6x - 2
c)
4x - 2
d)
4x - 4
27.
Simplify: 5−3×2+8÷4
a)

2

b)

1

c)

4

d)

3

28.
Convert 0.75 to a fraction.
a)
1:4
b)
1:2
c)
3:4
d)
4:4
29.
What is the least common multiple (LCM) of 6 and 8?
a)

12

b)

18

c)

30

d)

24

30.

If a square has a side length of 6 units, what is its area?

a)

18 square units

b)

24 square units

c)

30 square units

d)

36 square units