DEV Community

swetha palani
swetha palani

Posted on • Edited on

Logical probelms

🧠 50 Python Logical Coding Questions (Zoho-Style)

(Focus on loops, strings, arrays, logic, and real test patterns)

🔹 Basic Level (1–15)

  1. Print numbers from 1 to 100 without using loops.
  2. Print the Fibonacci series up to n terms.
  3. Find the factorial of a given number.
  4. Check if a number is prime.
  5. Reverse a number using while loop.
  6. Check if a string is a palindrome.
  7. Count vowels and consonants in a string.
  8. Find the sum of digits of a number.
  9. Swap two numbers without using a third variable.
  10. Print all even numbers in a given range.
  11. Print multiplication table of a given number.
  12. Find the greatest of three numbers using if-else.
  13. Check if a number is an Armstrong number.
  14. Print all prime numbers between 1 to 100.
  15. Find the average of numbers in a list.

🔹 Intermediate Level (16–35)

  1. Find 2nd largest element in a list.
  2. Remove duplicates from a list.
  3. Sort a list without using sort() or sorted().
  4. Find common elements between two lists.
  5. Count frequency of elements in a list.
  6. Merge two sorted lists.
  7. Reverse a string without using slicing.
  8. Check if two strings are anagrams.
  9. Count words in a given sentence.
  10. Find character frequency in a string.
  11. Replace all vowels in a string with *.
  12. Remove special characters from a string.
  13. Find missing number in 1 to n series.
  14. Find sum of even and odd numbers in a list.
  15. Print pattern:

    *
    **
    ***
    ****
    
  16. Print pattern:

    1
    12
    123
    1234
    
  17. Print pattern:

    A
    BB
    CCC
    DDDD
    
  18. Find the intersection and union of two sets.

  19. Count capital and small letters in a string.

  20. Print all unique elements in a list.


🔹 Advanced / Zoho Test Level (36–50)

  1. Implement a program to check for balanced parentheses.
  2. Find all pairs in a list whose sum equals a given number.
  3. Rotate array elements to left/right by k steps.
  4. Implement a simple calculator using functions.
  5. Find the longest word in a given sentence.
  6. Convert string "a3b2c1""aaabbc".
  7. Convert a decimal number to binary manually.
  8. Print frequency of each word in a paragraph.
  9. Reverse words in a sentence but not characters.
  10. Find the first non-repeating character in a string.
  11. Remove duplicates from string while maintaining order.
  12. Find if a number is “strong number” (sum of factorial of digits = number).
  13. Find sum of all prime digits in a number.
  14. Find maximum occurring character in a string.
  15. Given matrix → print its transpose.

📘 50 Aptitude & Reasoning Practice Questions (Zoho-Style)

🔹 Quantitative Aptitude (1–25)

  1. A train 120 m long passes a man walking at 6 km/hr in 10 sec. Find train speed.
  2. The ratio of ages of A and B is 3:5. After 10 years, ratio becomes 4:6. Find their present ages.
  3. If the cost price is ₹800 and gain is 20%, find selling price.
  4. A can do a work in 10 days, B in 15 days. How long will they take together?
  5. A person spends 40% on rent, 30% on food, saves ₹600. Find income.
  6. Find the simple interest on ₹5000 at 8% per annum for 2 years.
  7. Find compound interest on ₹4000 for 2 years at 10%.
  8. Ratio of milk to water is 3:2. Add 10L water → new ratio 3:4. Find milk quantity.
  9. Two pipes fill a tank in 12 and 15 mins. Together?
  10. Speed of boat in still water = 10 km/hr, current = 3 km/hr. Find upstream speed.
  11. If 20 men complete a work in 15 days, 10 men do it in how many days?
  12. Selling price = ₹660, cost = ₹600. Find profit %.
  13. A can finish a job in 12 days, B can do same in 8 days. Find ratio of their efficiency.
  14. Find average of 23, 27, 31, 35, 39.
  15. If 30% of x = 45, find x.
  16. A car travels 120 km at 60 km/h. Time taken?
  17. A number is increased by 20% and then decreased by 10%. Find net % change.
  18. Find least number divisible by 8, 12, 15.
  19. A man buys 10 pens at ₹15 each and sells them for ₹180 total. Find gain %.
  20. The sum of first 20 natural numbers = ?
  21. Two numbers are in ratio 4:5. Their LCM = 180. Find numbers.
  22. Find the perimeter of a rectangle with l=12, b=8.
  23. A can do 1/3 of work in 5 days. Whole work in?
  24. Find HCF of 36 and 84.
  25. 20% of a number is 50. Find the number.

🔹 Logical Reasoning & Puzzles (26–50)

  1. Arrange order:
  • Ramesh taller than Suresh
  • Mahesh shorter than Ramesh
  • Who is tallest?
  1. If CAT = 3120, DOG = 4157 → BAT = ?
  2. Series: 2, 6, 12, 20, 30, ?
  3. Find the odd one: 3, 5, 7, 9, 11
  4. If + means ×, − means ÷, × means −, ÷ means +, find: 6 + 3 × 2 − 4 ÷ 2
  5. Arrange words in dictionary order: Mango, Apple, Orange, Banana
  6. If 3x + 7 = 16, find x.
  7. Fill series: A1, B2, C3, D4, ?
  8. Which word can be made from “INFORMATION”?
  9. In a row, Ram is 7th from left and 10th from right. How many students total?
  10. 3 persons A, B, C. A beats B, B beats C, C beats A. Who is best?
  11. If 9 = 81, 8 = 64, 7 = 49, then 6 = ?
  12. Statement: All dogs are animals. All cats are animals. Conclusion: ?
  13. Odd one out: Square, Rectangle, Triangle, Circle
  14. If North-East = 1, South-West = 3, North-West = ?, find logic.
  15. Missing number:
3 5 8  
2 4 6  
1 ? 5
Enter fullscreen mode Exit fullscreen mode
  1. Mirror image of word “TEAM”?
  2. If today is Wednesday, what day will it be after 45 days?
  3. Rahul’s mother is sister of Rani’s father. How is Rahul related to Rani?
  4. Which number replaces the question mark: 4 → 16, 5 → 25, 6 → ?
  5. Spot the pattern: 1, 4, 9, 16, 25, ?
  6. Arrange logic: Q → S, R → T, then U → ?
  7. 6 people sit in a circle. A is left of B, C is opposite D — who is right of A?
  8. If in a code, A = 2, B = 4, C = 6, then ACE = ?
  9. Find missing alphabet: AZ, BY, CX, ?

Would you like me to:

  1. 📄 Send these 100 questions as a PDF file (Zoho Crash Pack)
  2. or 📚 Give answers + explanations for all coding and aptitude questions (for practice review)?

Which do you want next, da — PDF or with answers?

Top comments (0)