Virat
  • 1

Write an algorithm primedivisors(n) to compute the list of divisors of n that are prime numbers. (Hint: Compute divisors(n) and then filter out the primes in this list.)

  • 1

Compute divisors(n) to find all factors. Initialize an empty list prime-list. Iterate through each factor in divisors(n); if prime(d) returns true, add d into prime-list, then report prime-list.

Cbse Class 9 Maths Ganita Manjari Part 2 Solutions
class 9 maths ganita manjari part 2 chapter 11 question answer

Share

1 Answer

    1. Let all-divisors be the list obtained from divisors(n).
    2. Initialize an empty list called prime-list.
    3. For each element d in all-divisors:

    Run prime(d) to check whether d is a prime number.

    If prime(d) is true, add d to prime-list.

    1. Once all elements are examined, report prime-list as the final list of prime divisors.

     

    For more NCERT Solutions of Class 9 Maths Ganita Manjari Part 2 Chapter 11 The World of Algorithms Question Answer (2026-27)

    https://www.tiwariacademy.com/ncert-solutions/class-9/maths/ganita-manjari-chapter-11/

    • 0
Leave an answer

Leave an answer

Browse