If a string in Python is assigned as s = 'hello', what is the output of s[1:4]?
String slicing s[1:4] returns characters from index 1 to 3 (4 is exclusive): 'e', 'l', 'l' = 'ell'
What is the value of log₂(8)?
log₂(8) means 2^? = 8. Since 2³ = 8, the answer is 3
In a sequence, each number is the sum of the previous two numbers. If the first two numbers are 1 and 1, what is the 7th number?
Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13. The 7th number is 13.
Which of the following is the odd one out based on the pattern?
5, 10, 20, 40, 80, 160, 320, ?
Each number is multiplied by 2. The sequence is 5×2^n. The next number should be 320×2 = 640. This is a geometric progression with ratio 2.
In a coding system, CAT = 3, DOG = 4, ELEPHANT = 8. What would SNAKE equal?
The code represents the number of letters in the word. SNAKE has 5 letters, so SNAKE = 5.
Advertisement
Select the word that best completes the analogy: Teacher is to Student as Doctor is to ___
A teacher instructs a student, similarly a doctor treats a patient. The relationship is one of professional service provider to recipient.
Choose the option with the correct spelling:
The correct spelling is 'Occasion' with double 'c' and double 's'. This is a common spelling error in English.
In SQL, which keyword is used to remove duplicate rows from query results?
The DISTINCT keyword in SQL removes duplicate rows from the result set. Example: SELECT DISTINCT column FROM table;
If the compound interest on ₹8,000 at 10% per annum for 2 years is compounded annually, find the compound interest earned.
CI = P(1 + r/100)^n - P = 8000(1 + 10010)^2 - 8000 = 8000(1.1)^2 - 8000 = 8000(1.21) - 8000 = 9,680 - 8,000 = ₹1,680.
A train travels 120 km in 2 hours and then 180 km in 3 hours. What is the average speed of the train for the entire journey?
Total distance = 120 + 180 = 300 km. Total time = 2 + 3 = 5 hours. Average speed = 5300 = 60 km/h
If 15% of x is 45, what is 25% of x?
15% of x = 45, so x = 045.15 = 300. Then 25% of 300 = 0.25 × 300 = 75
A shopkeeper buys an item for Rs. 800 and sells it at a profit of 20%. What is the selling price?
Selling Price = Cost Price + Profit = 800 + (20% of 800) = 800 + 160 = 960
A man invests Rs. 5000 at 8% per annum simple interest. How much will be his total amount after 3 years?
Simple Interest = (P × R × T)/100 = (5000 × 8 × 3)/100 = 1200. Total = 5000 + 1200 = 6200
In a class of 60 students, 35% are girls. How many boys are there?
Girls = 35% of 60 = 21. Boys = 60 - 21 = 39
The ratio of ages of A and B is 5:3. If A is 20 years old, how old is B?
A:B = 5:3. If A = 20, then 5x = 20, so x = 4. B = 3x = 3(4) = 12 years
A box contains 3 red balls, 4 blue balls, and 5 green balls. What is the probability of drawing a red ball?
Total balls = 3 + 4 + 5 = 12. P(red) = 123 = 41
If the cost price is Rs. 500 and profit percentage is 25%, what is the profit amount?
Profit = 25% of 500 = 0.25 × 500 = 125
A worker can complete a task in 10 days. How much work will be done in 3 days?
Work done per day = 101 = 10%. In 3 days = 3 × 10% = 30%
If a < b and b < c, which of the following is true?
By transitivity, if a < b and b < c, then a < c
The average of five numbers is 30. What is their sum?
Sum = Average × Count = 30 × 5 = 150