You are on page 1of 18

InfyTQ Mock Test Aptitude Questions

1. In a farm, 50 hens lay 200 eggs in 2 days, how many days that 20 hens to lay 400 eggs?
A. 100 b. 200 c.400 d. 800
Answer: c

2 . A mixture contains sand and gravel in the ratio 1: 4. The sand has 20% impurity. If total mixture
weights 10 kg, how much impurity is there? (Consider that gravel
has no impurity).
(a) 300g (b) 450g (c) 400g (d) 500g
Answer: c

3. A man sold 25 chairs for Rs.375 and sells them at a profit equal to the selling price of 5 chairs. What is
the selling price of one chair?
(a) Rs.18.75 (b) Rs.14.50 (c) Rs.15.20 (d) Rs.17.20
Answer: d

4. A sum of money doubles itself in 5 yr . It will become 4 times to itself , with simple interest in
(a) 10 yr (b) 12 yr (c) 15 yr (d) 20 yr
Answer: c

5. The average age of 30 students is 9 yr. If the age of their teacher is included, it becomes 10 yr.
The age of the teacher (in years) is
(a) 27 (b) 31 (c) 35 (d) 40
Ans: d

6. In how many ways can the letters of the words “BENEDICTORY” be arranged so that the
vowels may never be separated?
(a) 4 × (8)! (b) 8! × 4! (c) 12! (d)12x 8!
Answer: d

7. A man sitting in the train which is 300 m long, travelling at 50 km/h observes that a goods train,
travelling in opposite direction, takes 9 s to pass him. If the goods train is 150 m long, find its speed.
(a) 3.33 km/h (b) 10 km/h (c) 15 km/h (d) 30 km/h
Answer: b

8. There are 64 history books arranged in a row at central library Bangalore. Ancient history is 25th from
the left side of the row and Middivel history is 30th from the right side of the row. What is the total
number of books between Ancient and Middivel history?
A.6 B.7 C.8 D.9
Answer: D
Directions for questions 9 to 10: Study the following information carefully and answer the questions
given below:

I. A, B, C, D, E, F, and G are sitting on a wall and all of them are facing east.
II. C is on the immediate right of D.
III. B is at an extreme end and has E as his neighbour.
IV. G is between E and F.
V. D is sitting third from the south end.

9. Who is sitting to the right of F ?

a) A b) C c) D d) None of these
Answer: c

10. Name of person who should change place with C such that he gets the third place from the
south end.
a) E b) F c) G d) D
Answer: d
DBMS Quiz
Q 1. DBMS is an interface between

1. Database and user


2. Database application and Database
3. Database and SQL
4. Data and Database
Ans 2
Q.2 Which of the following is an advantage of database management approach?
1. Data is programs dependent
2. Data redundancy increases
3. Data can be accessed by multiple programs
4. Multiple users can not access data concurrently
Ans. 3
Q.3 In many to one relationships, the primary key of one entity acts as foreign key on which side
1. On the side where single(one) relationship is defined
2. On the side where many relationship is defined
3. On both the sides
4. Neither of them
ANS 2
Q.4 In many to many relationship between two entities usually results in how many table?
1. Two
2. Three
3. Four
4. Five
Ans. 2
Q.5 The relationship between the two table is created using____________
1. Candidate Key
2. Primary key
3. Foreign Key
4. Check Constraint
Ans. 3
Q.6

Identify the candidate key for the above table


1. Operator
2. Plans
3. Operator, RechargeType
4. Operator, Plans
Ans. 4
Q.7 Determine the appropriate command classification for INSERT
1. DCL
2. DDL
3 DML
4. TCL
Ans 3
Q.8 A functional dependency is a relationship between or among
1. Entities
2. Rows
3. Attributes
4. Tables
Ans 3
Q.9 Consider a relation R(A,B,C,D) with the following functional dependencies
A—> (B,C,D) , (A,D)  (B,C) and (C, D)  (A, B). Identify the candidate key(s).
1. {A}
2. {A}, { C,D}
3. {A}, {C,D}, {A,D}
4. {C,D}
Ans. 2
Q.10 Relation R1 has 20 tuples and 6 attributes. Relation R2 has 0 tuples and 7 attributes. When
a ‘CROSS JOIN’ is achieved between R1 and R2, how many tuples would the resultant set have?
1. 20
2. 26
3. 0
4. 33
Ans. 3
InfyTQ MockTest Python
Q1. What will be the output of the following Python Code?

Choose the correct answer from the following:

(v) Error, no method called update for set data type

(vi) {1,2,3,4,5}

(vii) Error, list can’t be added to the set

(viii) Error, duplicate item present in the list

Ans: (ii)

Q2 What will be the output of the following Python Code?

Choose the correct answer from the following:

(i) (1,2,3,5)

(ii) (2,3,1,5)

(iii) None
(iv) Error, tuple has no attribute sort

Ans: (iv)

Q3 What will be the output of the following Python Code?

Choose the correct answer from the following:

(i) [4, 8, 12, 5, 10, 15, 6, 12, 18]

(ii) [4, 10, 18]

(iii) [4, 5, 6, 8, 10, 12, 12, 15, 18]

(iv) [18, 12, 6, 15, 10, 5, 12, 8, 4]

Ans: (iii)

Q4 What will be the output of the following Python Code?

Choose the correct answer(s) from the following: (MSQ Type Question)

(i) [(‘HELLO’,5), (‘WORLD’,5)]

(ii) [(‘H’,1), (‘E’,1), (‘L’,1), (‘L’,1), (‘O’,1), (‘ ’,1), (‘W’,1), (‘O’,1), (‘R’,1),
(‘L’,1), (‘D’,1) ]

(iii) [(‘HELLO WORLD’, 11)]

(iv) None of these


Ans: (ii)

Q5 What will be the output of the following Python Code?

Choose the correct answer from the following:

(i) {'Pos': 1, 'Neg': 3}

(ii) {'Pos': 2, 'Neg': 2}

(iii) {'Pos': 4, 'Neg': 0}

(iv) Error

Ans: (ii)
Q6 What will be the output of the following Python Code?

Choose the correct answer from the following:

(i) {'Y': 1, 'S': 2, 'O': 1, 'F': 1, 'N': 1, 'I': 1}

(ii) {'I': 1, 'N': 1, 'F': 1, 'O': 1, 'S': 2, 'Y': 1}

(iii) {'I': 1, 'N': 1, 'F': 1, 'O': 1, 'S': 1, 'Y': 1, 'S': 1}

(iv) {'S': 1,'Y': 1, 'S': 1, 'O': 1, 'F': 1, 'N': 1, 'I': 1}

Ans: (ii)

Q7 What will be the output of the following Python Code?

Choose the correct answer from the following:


(i) (3, 4, 5)

(ii) (1, 3, 2, 4, 6, 5)

(iii) (1, 2, 6)

(iv) Error

Ans: (iii)

Q8 What will be the output of the following Python Code?

Choose the correct answer from the following:

(i) 487 397 487 357

(ii) 487 357 487 357

(iii) 487 397 397 357

(iv) 487 357 397 357

Ans: (i)
Q9 What is the value of list1 after executing the following lines of codes?

Choose the correct answer from the following:

(i) [34, 17, 12, 88, 53, 97, 62]

(ii) [88, 53, 12, 88, 53, 97, 62]

(iii) [88, 53, 97, 88, 53, 97, 62]

(iv) Error

Ans: (ii)

Q10 What will be triple here after execution?

Choose the correct answer from the following:

(i) [(2, 4, 5)]

(ii) [(3, 3, 5), (2, 4, 5) (3, 4, 5), (3, 4, 6)]

(iii) [(2, 4, 5), (3, 3, 5), (3, 4, 5), (3, 4, 6)]

(iv) [(2, 4, 5), (3, 3, 5), (3, 4, 6), (3, 4, 5)]

Ans: (iii)
Q11 What will be the output of the following program?

Choose the correct answer from the following:

(i) 10

(ii) 8

(iii) 12

(iv) 11

Ans: (ii)

Q12 What will be the output of the following program?


Choose the correct answer from the following:

(i) 5

(ii) 8

(iii) 10

(iv) 13

Ans: (ii)

Q13 What does mystery([22,14,19,65,82,55]) return?

Choose the correct answer from the following:

(i) [65, 82, 14,19, 22, 55]

(ii) [14, 22, 19, 65, 82, 55]

(iii) [19, 65, 14, 82, 22, 55]


(iv) [19, 65, 55, 22, 82, 14]

Ans: (iii)

Q14 What will be the output of the following program?

Choose the correct answer from the following:

(i) ['A','B','C',3,4,5]

(ii) [5,4,3, 'C', 'B', 'A']

(iii) ['A','B','C',3,4]

(iv) [5,4,3, 'C', 'B']

Ans: (i)

Q15 What will be the output of the following code?

Choose the correct answer from the following:

(i) 1,10,3,4

(ii) 1,2,10,4

(iii) 1,10,10,4

(iv) Error
Ans: (iv)

Q16 Which of the following is correct?

Choose the correct answer from the following:

(i) 5

(ii) 6

(iii) 0

(iv) Error

Ans: (iv)
Q17 What will be the output of below Python code?

Choose the correct answer from the following:

(i) 1

(ii) 1

(iii) 2

(iv) 2

Ans: (ii)
Q18 What will be the output of the following Python code?

Choose the correct answer from the following:

(i) The program has an error because constructor can’t have default
arguments

(ii) Nothing is displayed

(iii) “Hello World” is displayed

(iv) The program has an error display function doesn’t have parameters

Ans: (iii)

Q19 What will be the output of the following Python code?

Choose the correct answer from the following:

(i) 1

(ii) 2
(iii) 3

(iv) error, there is more than one return statement in a single try-finally block

Ans: (ii)

Q20 What is the output of the following program?

Choose the correct answer from the following:

(i) Hey ZeroDivisionError Hue ZeroDivisionError

(ii) Hey ZeroDivisionError Hue ZeroDivisionError

(iii) Hue IndexError Hey ZeroDivisionError Hue ZeroDivisionError

(iv) Hue IndexError Hey ZeroDivisionError

Ans: (iii)

You might also like