No products in the cart.

Q} ??Print prime numbers using Recursion...in …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Q} ??Print prime numbers using Recursion...in python??
  • 3 answers

Vineet Midha 5 years, 2 months ago

This is not an efficient solution.

Priya Dharshini 5 years, 2 months ago

Wlcm...?

Priya Dharshini 5 years, 2 months ago

def check(n, div = None): if div is None: div = n - 1 while div >= 2: if n % div == 0: print("Number not prime") return False else: return check(n, div-1) else: print("Number is prime") return 'True' n=int(input("Enter number: ")) check(n)...... i saw it from google not mine..... i hope u will get correct out put ,this chapter is not yet started in school..
http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App