0% found this document useful (0 votes)
1K views7 pages

Wiley Edge Apti All Answers

Here are the steps to solve this problem: 1. Check if the last character of the given string is a digit or not using isdigit() method. 2. If it is a digit, calculate the length of the string by using len(a) and store it in a variable say n. 3. Convert n to string using str(n). 4. Check if the length of the string is 1 or 2. If it is more than 2, return -1. 5. Else, check if the last character of the string matches the first character of the converted length string. If yes, return the second character of the length string. 6. If the last character is not

Uploaded by

abi
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)
1K views7 pages

Wiley Edge Apti All Answers

Here are the steps to solve this problem: 1. Check if the last character of the given string is a digit or not using isdigit() method. 2. If it is a digit, calculate the length of the string by using len(a) and store it in a variable say n. 3. Convert n to string using str(n). 4. Check if the length of the string is 1 or 2. If it is more than 2, return -1. 5. Else, check if the last character of the string matches the first character of the converted length string. If yes, return the second character of the length string. 6. If the last character is not

Uploaded by

abi
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/ 7

1. The sum of the two-digit number is 8.

When we interchange the digits the new number is 18 greater than the earer
number. Find the number

35

53

32

34

Ans:35

2. Neshanth fails a test by 10% from the cut-off marks, he got 222 marks overall. What is the maximum mark in the test
if the cut-off scores 296 for the same test?

830

810

780

740

Ans:740

3. Statements

All books are pages. Some pages are letters All letters are numbers

Conclusions

Some books are letters,

Some numbers are book

Some numbers are pages

Some letters are books

None follow

Only I and II follow

Only II and III follow

Only III follow

Ans: Only III follow

4. A teacher while manging 10 answer papers, has to arrange papers such a way that the highest and the lowest score
papers should never be together, In how many ways he can do this arrangement?

8*9!

8*8!

7*9!

9*8!

Ans:8*9!
5. What least number must be subtracted from 3000 (that number has to be the least number) such that the resultant
number is exactly divisible by 7,11 and 137

998

1001

999

None of these

Ans:998

6. Six friends are sitting in a circle and are facing the centre of the airdle Deep is between Michael and Patra. Lav is
between Michael and Phelps Pruitt and Michael are opposite to each other. If Michael and Pruitt are interchanged, then
who is sitting left to Michael?

Michael

Phelps

Patra

Lav

Ans: Phelps

7. A sack of rice costs Rs.360. If the quantity was 6 more and pe kg costs Rs 3 less, the total cost would remain
unchanged What is the weight of the sack?

Ans: 24kgs

8.In a certain code EQUITY is written an FSXMYE then how is MARKET written in that code?

NCYCLZ

NDUCUZ

NCVJKZ

NCUJUZ

Ans: NCUJUZ
9. Nishanth fails a test by 10% from the cut-off marks, he got 222 marks overall. What is the maximum mark in the test
the cut-off score is 296 for the same test?

830

810

780

740

Ans:740
10.. Pointing to a photograph, Seema said that this lady's mother in my mother's daughter. How is the mother of the
lady in the photograph related to Seema?

Mother

Aunt

Daughter

Sister

Ans: sister

11. Two pipes A and B can fill a tank in 12 hours and 15 hours respectively. If they are opened on alternate hours with
pipe B opened first, then in how many hours the tank will be ful?

13 ¼ hrs

14 2/5 hrs

14 hrs

13 2/5 hrs

Ans: 13 ¼ hrs
12. Sherin borrowed 2 loans at SI one for Rs 1800 at 7% and Rs.1700 at 8% for same period. She paid Rs.1310 as total
interest. Find the period for which the money is borrowed

3 years

6 years

5 years

6 years

Ans: 5 years

13. Sanjay rolled die three times and the numbers appearing on the uppermost face when added will be 15. What is the
publ the first number that appeared was four?

1/5

1/3

1/7

Ans: 1/5

14. Van Buren started to move in the direction of the North. After moving 15ft, he turned to his right and moved 15 ft.
Again he to his right and moved 15 ft. Now how far is he from his starting point and in what direction?

15 ft, North

15 ft, South

30 ft, East

None of these

Ans:15 ft, South


15. A cube be painted green on all faces is cut into 216 cubes of equal ses How many cubes are painted on one face only?

48

96

Ans: 96

16.If two trains of lengths 360 m and 120 m take 30 seconds and 15 seconds respectively to cross a telegraph post, then
in what time (in seconds) will they cross each other traveling in opposite directions?

12

18

14

24

Ans.24

17.The cost of manufacturing a perfume comprises the cost of materials, labour and overheads in the ratio 5:4:3. The
labour cost is Rs.200. If the perfume is sold at a price one-third more than the cost price, find the profit.

250

150

200

300

Ans.200

18.Read the following information to answer the given questions

1. Pepper Potts, Hulk, Ironman, Hawkeye, Thor Lok and Black Widow are sitting in a circle.

2. Pepper Potts, Hulk, Ironman, Hawkeye, Loki and Black Vidow are sitting at equal distances from each other.

3. Ironman is sitting two places right of Loki who is sitting one place right of Hawkeye. (People seated equal distance
only considered)

4. Pepper Potts forms an angle of 90° from Thor and an angle of 120* from Hulk.

5. Hulk is just opposite Black Widow and is sitting on the left of Thor

Ans.None of the Above

19.A and B are sisters. C and D are brothers. A's son is D's brother,

How is B related to C?

1.Uncle

2.Sister

3.Grand Mother

4.Aunt
Ans.Aunt

20.247,123,60,34,27,?

1.14

2.26

3.18

4.27

Ans.27

Code:
Single file programming:

n=int(input())

c=[]

for i in range(2*n-1):

if i==n-1:

print(' '*2*i+str(i+1))

continue

if i>n-1:

print(c[n-i-1])

continue

c.append(' '2*i+str(i+1)+' '*(4 (n-i-1)-1)+str(i+1))

print(c[i])

Caption contest

Exeter caption contest

n=input()

s=input()

c=0

for i in range(0,len(n)):
if n[i]=='?' and s[i]=='?':

pass

elif n[i]==s[i]:

pass

elif n[i]=='?' and s[i].isalpha():

pass

elif n[i].isalpha() and s[i]=='?':

pass

else:

c=c+1

m=0

for i in range(0,len(n)):

if n[i]!=s[i] :

m=m+1

elif n[i].isalpha() and s[i]=='?':

m=m+1

elif n[i]=='?' and s[i].isalpha():

m=m+1

elif n[i]=='?' and s[i]=='?':

m=m+1

elif n[i].isalpha() and s[i].isalpha():

if n[i]==s[i]:

pass

print(c,m)

Robert is given a string that ends with a character or a number. He has to check the length of the given string and append it
to the end in such a way that if the original string ends with a number then the new string with the appended value must
have the length of the string as the last two characters. If the string ends with a character then append the total length as
the last character. Also, the number to be appended must be a single positive digit. Write a code to implement
the given scenario.
-def f(a):

if a[-1].isdigit():

n-len(a)-1

c-str(n)

if len(c) 9:

return -1

if c[0]=a[-1]:

return c[1]

if len(str(len(a))) 9:

return -1

return a str(len(a))

a=input()

print(f(a))

You might also like