0% found this document useful (0 votes)
101 views10 pages

Infosys

Here is the code to solve this problem: ```python lights = [1,1,0,0,0,1,1,0] # initial state of lights for i in range(len(lights)): if i==0: left = lights[-1] else: left = lights[i-1] if i==len(lights)-1: right = lights[0] else: right = lights[i+1] if left==right: lights[i] = 0 else: lights[i] = 1 print(lights) ``` This code: 1. Initializes the lights array with the initial

Uploaded by

Dummy vedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views10 pages

Infosys

Here is the code to solve this problem: ```python lights = [1,1,0,0,0,1,1,0] # initial state of lights for i in range(len(lights)): if i==0: left = lights[-1] else: left = lights[i-1] if i==len(lights)-1: right = lights[0] else: right = lights[i+1] if left==right: lights[i] = 0 else: lights[i] = 1 print(lights) ``` This code: 1. Initializes the lights array with the initial

Uploaded by

Dummy vedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Wipro Aptitude Questions with Answers

1) There are two sections in a question paper each contains five questions. A
student has to answer 6 questions. The maximum number of questions that can be
answered from any section is 4. How many ways he can attempt the paper?

a) 50

b) 100

c) 120

d) 200

Answer:Option d

Possible ways in which he can attempt 6 questions are

5C4*5C2 = 50

5C3*5C3 = 100

5C2*5C4 = 50

50+100+50 = 200

2) If 5 men take an hour to dig a ditch, then how long should 12 men take a dig to
the ditch of the same type?

a) 25 min

b) 30 min

c) 28 min

d) 20 min

Answer:Option a

M1H1 = M2H2

5*60 = 12*H2

H2 = 25 min
Practice more Wipro Aptitude Questions

Wipro Logical Questions and Answers

Questions 1 to 2: Read the following instructions carefully and answer the


questions given below it. (Wipro 2015)

From a group of six boys M,N,O,P,Q,Rand five girls G,H,I,J,Kateam of six is to be


selected. Some of the criteria of selection are as follows:

(i) M and J go together.

(ii) O cannot be placed with N.

(iii) I cannot go with J.

(iv) N goes with H.

(v) P and Q have to be together.

(vi) K and R go together.

Unless otherwise stated, these criteria are applicable to all the following
questions.

1) If the team consists of 2 girls and I is one of them, the other members
are_____.

A) GMRPQ B) HNOPQ C) KOPQR D) KRMNP

2) If the team has four boys including O and R, the members of the team other than
O and R are___.

A) HIPQ B) GKPQ C) GJPQ D) GJMP

3) In a certain code, if 352168305 denotes INFLATION, and 7439% denotes PRICE, then
what will 23565%9 denotes?

A) FINANCE B) FINNCEA C) FINANEC D) FINAENC


4) What should come in the place of question mark?(Wipro 2017)13 21 37 ? 133 261

A) 69 B) 64 C) 32 D)168

5) What should come in the place of question mark?15625 6250 2500 1000 ? 160

A) 600 B) 400 C) 500 D) 650

6) If 21st December 2013 Wednesday falls. What day of the week will it be on the
same day in 2017?

A) Sunday B) Monday C) Saturday D) Friday

7) Find which conclusion follows the statements.

Statements:

All papers are stones.

All stonearescissors.

Conclusions:

Some scissors are papers

All scissors are papers

A) Only I follows B) Only II follows C) Either I or II follows D) None follows

9) Find the odd man out.

A) Sphere B) Cube C) Circle D) Ellipse

Practice more Wipro Logical Reasoning Questions with Answer

Wipro Verbal Ability Questions

1) In each following questions, out of the given alternatives, choose the one which
best expresses the meaning of the given word -Mayhem
A) Jubilation B) Havoc C) Excitement D) Defeat

2) Choose the option which gives the closest meaning to the phrase given below.
(Wipro 2017)

Phrase: Beat about the bush

a) Discuss a matter without coming to the point

b) Roaming without any goal

c) Killing the snake near the bush

d) Taciturn

3) Arrange the below statements in the order of their occurrence. Note that the
first (S1) and last statement (S6) are given.

S1: In the middle of one side of the square sits the Chairman of the committee, the
most important person in the room.

P: For a committee is not just a mere collection of individuals.

Q: On him rests much of the responsibility for the success or failure of the
committee.

R: While this is happening we have an opportunity to get the feel of this


committee.

S: As the meeting opens, he runs briskly through a number of formalities.

S6: From the moment its members meet, it begins to have a sort nebulous life of its
own.

A) RSQP B)PQRS C) SQPR D) QSRP

4) Each of the following sentences has been divided into four parts. There is an
error in one of the parts. Point out the part which has an error. (Wipro 2017)
(A)The small child/ (B) does/ (C) whatever his father/ (D) was done. (E)No error

A)A B) B C) C D) D E) E

5) In each of the following questions, there is a certain relationship between the


two given words on one sideof::and one word is given on another sideof::.Another
word is to be found from the given alternatives, having the same relationship with
this word as the words in the given pair. Choose the correct alternative.(Wipro
2017)

College:Student :: Hospital:?

A) nurse B) doctor C) treatment D)patient

The passage given below is followed by a set of five questions. Choose the most
appropriate answer to each question.

Today the import duty on a complete machine is 35% for all practical purposes,
whereas the import duty on raw materials and components ranges from 40% to 85%. The
story does not end here. After paying such high import duties on components, once a
machine is made it suffers excise duty of 5% to 10% ( including on the customs duty
already paid ). At the time of sale the machine tools suffers further taxation, i.e
central sales tax or state sales tax which ranges from 4 to 16%. This much for tax
angle.

Another factor which pushes the cost of manufacture of machine tools at a very high
rate of interest payable to banks which ranges upto 22%, as against 4% - 7%
prevailing in advanced countries.The production of machine tools in India being not
of the same scale as it is in other countries, the price which India's machine
tools builders have to pay for the components is more or less based on the pattern
of high pricing applicable to the prices of spares.

The above represents only a few of the extraneous reasons for the high cost of
Indian machines. The machine tool industry in India has an enviable record of very
quick technology absorptions, assimilation and development. There are a number of
success stories about how machine tool builders were of help at the most critical
times.

It will be a pity in fact a tragedy if we allow this industry to die and disappear
from the scene. It is to be noted that India is at least 6000 km away from any
dependable source of supply of machine tools. The Government of India has always
given a great

deal of importance to the development of small scale and medium scale industries.
This industry has also performed pretty well.

Today they are in need of help from India's machine tool industry to enable them to
produce quality components at reduced costs. Is it anybodys case that the needs of
this fragile sector (which needs tender care) will be met from 6000 km away. Then
what is it that industry requests from Government. It wants level playing fields.

In fact, all of us must have a deep introspection and recognise the fact that the
machine tool industry has a very special place in the country from the point of
strategic and vital intersects of the nation. Most important, it requests for the
Govt.s consideration and understanding.

a) According to the passage, assembling imported components into machine proves


ultimately

A) cheaper than importing complete machine

B) costlier than importing machine

C) more cost effective than importing machine

D) on par with cost of imported machine

E) a very stupendous and unmanageable task

b) According to the passage, all the following factors are responsible for high
cost of Indian machines except

A) higher import duty on spares

B) excise duty

C) banks rate on interest on loans for manufacture

D) high profit margin expected by manufacturers

E) sales tax

c) If the banks rate of interest in India is made on par with the advanced
countries, the cost of manufacture of machine tools :
A) may go up by about 4% to 7%

B) may increase by about 22%

C) may decrease by about 4% to 7%

D) may decrease by about 15% to 18%

E) will remain the same due to import duty

d) The availability of Indian machines tool industry's help to small scale industry
is most likely to result into

A) increase in demand of imported tools

B) deterioration in quality of component manufactured by them

C) further increase in custom duty on imported machines

D) enhancement in quality and quantity of their production at a cheaper cost.

E) severe competition among the small and medium scale industries.

e) Which of the following is true in the context of the passage?

A) India's machine tool industry has a praise-worthy record of performance

B) In critical times, the machine tools builders allowed the industry to perish

C) In the case of machines, the excise duty is levied only on the cost price

D) India's quantum of production of machine tools is more than that of other


advanced countries.

E) None of these

Practice Wipro more Verbal Questions with Answers

Wipro Coding Questions

For more questions, check this page - Wipro coding questions with solutions

Question 1

Design a way to sort a list of positive integers in descending order based on the
frequency of elements.
Input: Consists of two arguments

Size: no of elements
Arr: list of positive integers

Output: Return a list of +ve integers sorted according to frequency of elements

Answer Code:

#include <stdio.h>
int main()
{
intn,i,j,cnt=0,k=0,f=0;
scanf("%d",&n);
intarr[100],ele[100],count[100];
for(i=0;i<n;i++)
scanf("%d",&arr[i]);
for(i=0;i<n;i++)
{
if(arr[i]!=arr[i+1])
{
ele[k++]=arr[i];
}
}
k=0;
for(i=0;i<n;i++)
{
cnt=0;
for(j=0;j<n;j++)
{
if(ele[i]==arr[j])
{
cnt++;
}
}
if(cnt!=0)
count[k++]=cnt;
}
for(i=0;i<k;i++)
{
for(j=0;j<k;j++)
{
if(count[i]>=count[j])
{
int t=count[i];
count[i]=count[j];
count[j]=t;
int x=ele[i];
ele[i]=ele[j];
ele[j]=x;
}
}
}
for(i=0;i<k;i++)
{
if(count[i]==count[i+1])
{
int x=ele[i];
ele[i]=ele[i+1];
ele[i+1]=x;
}
}
for(i=0;i<k;i++)
for(j=0;j<count[i];j++)
{
printf("%d ",ele[i]);

}
return 0;
}

Eg: size 19

arr = {1,2,2,3,3,3,4,4,5,5,5,5,6,6,6,7,8,9,10}

O/p:

{5,5,5,5,3,3,3,6,6,6,2,2,4,4,1,7,8,9,10}

Question 2

Mr.Woods, an electrician has made some faulty connections of eight street lights in
Timberland city. The connections are such that if the street lights adjacent to a
particular light are both ON (represented as 1) or are both OFF (represented as 0),
then that street light goes OFF the next night. Otherwise, it remains ON the next
night. The two street lights at the end of the road have a single adjacent street
light, so the other adjacent light can be assumed to be always OFF. The state of
the lights on a particular day is considered for the next day and not for the same
day.

Due to this fault, the people of the city are facing difficulty in during on the
road at night. So they have filed a complaint about this to the Head of the Federal
Highway Administration. Based on this complaint, the head has asked for the report
of the state of street lights after M Days.

Write an algorithm to output the state of the street lights after the given M days.

Answer Code:
#include<stdio.h>
Int cellcompete(int *cells, int day)
{
Int I,j;
For(i=0;i<day;i++)
{
Cells[-1]=0;
Cells[8]=0;
Int u[8];
For(int i=-1;i<9;i++)
{
U[i]=cells[i];
}
For(j=0;j<8;j++)
{
If(u[j-1]==u[j+1])
{
Cells[j]=0;
}
else
Cells[j]=1;
}
}
For(i=0;i<8;i++)
Printf(“%d”,,cells[i]);
}
int main()
{
Int cells[8],n,I;
For(i=0;i<8;i++)
Scanf(“%d”,&cells[i]);
Scanf(“%d”,&n);
Cellcompete(cells,n);
Return 0;
}

You might also like