Skip to content
Pooja Bhatia Classes Hari Nagar
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
Pooja Bhatia Classes Hari Nagar

sa 12 cs chapter 3

6. Write a function namely zzfhRoot( ) that receives two parameters x and n and returns nth root of x i.e.,

sa 12 cs chapter 3 / PythonCSIP CS IP

6. Write a function namely zzfhRoot( ) that receives two parameters x and n and returns nth root of x i.e., Read More »

7. Write a function that takes a number n and then returns a randomly generated number having exactly n digits (not starting with zero) e.g., if n is 2 then function can randomly return a number 10-99 but 07, 02 etc. are not valid two digit numbers.

sa 12 cs chapter 3 / PythonCSIP CS IP

# Code from random import randint def ran(n): x = int(‘9’*(n-1))+1 # first n-digit number, string is converted back to int y = int(‘9’*n) # last n-digit number return randint(x, y) print(‘Random number of digit 3 is’, ran(3)) print(‘Random number of digit 5 is’, ran(5)) # Output Random number of digit 3 is 883 Random

7. Write a function that takes a number n and then returns a randomly generated number having exactly n digits (not starting with zero) e.g., if n is 2 then function can randomly return a number 10-99 but 07, 02 etc. are not valid two digit numbers. Read More »

Post pagination
← Previous 1 2 3 4 … 21 Next →
  • We teach following classes
    • Class 12
    • Class 11
    • Class 10
    • Class 9
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship
  • We teach following classes
  • Sumita Arora IP/CS Solutions
  • Jobs/Internship

Copyright © 2025 Pooja Bhatia Classes Hari Nagar | Powered by Pooja Bhatia Classes Hari Nagar.