Read and download the CBSE Class 12 Computer Science Functions In Python Assignment for the 2025-26 academic session. We have provided comprehensive Class 12 Computer Science school assignments that have important solved questions and answers for Functions In Python. These resources have been carefuly prepared by expert teachers as per the latest NCERT, CBSE, and KVS syllabus guidelines.
Solved Assignment for Class 12 Computer Science Functions In Python
Practicing these Class 12 Computer Science problems daily is must to improve your conceptual understanding and score better marks in school examinations. These printable assignments are a perfect assessment tool for Functions In Python, covering both basic and advanced level questions to help you get more marks in exams.
Functions In Python Class 12 Solved Questions and Answers
Short Answer Type Questions :
Question: What is default parameter?
Answer: A parameter having default value in the function header is known as a default parameter.
Question: What is a Library in Python?
Answer: A Library is a collection of modules that together caters to specific types of needs or applications.Like NumPy library of Python caters to scientific computing needs.
Question: Is it necessary to have a base case in a recursive function?
Answer: Yes
Question: What is base case in recursion?
Answer: Preknown case of recursive function, whose solution is pre-known is called base case.
Question: What is recursion?
Answer: Recursion refers to a programming technique in which function calls itself either directly or indirectly.,
Question:. What is module in Python?
Answer: A module is a file with .py extension that contains variables, class definitions, statements and functions related to a particular task.
Question: When is recursion endless?
Answer: An infinite recursion is when recursive function calls itself endlessly.
Question: Array for binary search should be sorted or not?
Answer: Yes
Question: Can a function return multiple values in python?
Answer: YES.
Question: What will be the output of the following code?
a=1
def f():
a=10
print(a)
Answer: The code will print 1 to the console.
Question: Consider the following function headers. Identify the correct statement: –
1) def correct(a=1,b=2,c): 2) def correct(a=1,b,c=3):
3) def correct(a=1,b=2,c=3): 4) def correct(a=1,b,c):
Answer: – 3) def correct(a=1,b=2,c=3)
Question: Write the features of a module.
Answer: – 1) Modules can be reused in other programmes
2) It is independent group of code and data
Question: Create a package ArithmeticOperations (named AO) contain sum, product and difference of two numbers and use it in your main programme.
Answer: – def ADD(X,Y):
return (X+Y)
def PRODUCT(X,Y):
return(X*Y)
def DIFFERENCE(X,Y):
return(X-Y)
Now lets save this file as AO.py then our module is created now.
Now we are creating our main python file: –
import AO
n1=int(input(‘Enter a Number’))
n2=int(input(‘Enter another Number’))
print(‘Sum = ‘, AO.ADD(n1,n2))
print(‘Difference=’,AO.DIFFERENCE(n1,n2))
print(‘Product=’,AO.PRODUCT(n1,n2))
Question: Find the output:
a) def out(n):
if(n==0):
return
else:
out(n-1)
print(n)
n=6
out(n)
b) def sum(n):
if(n==1):
return 1
return n*n+sum(n-1)
n=4
print(“Sum is:”,sum(n))
c) def compute(a,b):
if(b==0):
return a
else:
return compute(a,a%b)
a=6
b=2
c=compute(a,b)
print(“Computer data:”,c)
Answer: a)
1
2
3
4
5
6
b) Sum is: 30
c) Computer data: 6
Question: What are the advantage and disadvantage of recursion?
Answer: Advantages of Recursion:
i. Recursive functions make the code look clean and elegant.
ii. A complex task can be broken down into simpler sub-problems using recursion.
iii. Sequence generation is easier with recursion than using some nested iteration.
Disadvantages of Recursion:
i. Sometimes the logic behind recursion is hard to follow through.
ii. Recursive calls are expensive (inefficient) as they take up a lot of memory and time.
iii. Recursive functions are hard to debug.
Question: Write recursive code to compute the factorial of an integer.
Answer: def calc_factorial(x):
if x == 1:
return 1
else:
return (x * calc_factorial(x-1))
num = 4
print(“The factorial of”, num, “is”, calc_factorial(num))
Question: Rewrite the correct code after removing the errors: –
def SI(p,t=2,r):
return (p*r*t)/100
Answer: – def SI(p, r, t=2):
return(p*r*t)/100
Application Based Questions :
Question: How many values a python function can return? Explain how?
Answer: Python function can return more than one values.
def square_and_cube(X):
return X*X, X*X*X, X*X*X*X
a=3
x,y,z=square_and_cube(a)
print(x,y,z)
Question: Predict the output of the following code fragment?
def check(n1=1, n2=2):
n1=n1+n2
n2+=1
print(n1,n2)
check()
check(2,1)
check(3)
Answer: 3 3
3 2
5 3
Question: Write a python program to sum the sequence given below. Take the input n from the user. img
Answer: def fact(x):
j=1 , res=1
while j<=x:
res=res*j
j=j+1
return res
n=int(input(“enter the number : “))
i=1, sum=1
while i<=n:
f=fact(i)
sum=sum+1/f
i+=1
print(sum)
Question: Write a program to compute GCD and LCM of two numbers def gcd(x,y):
Answer: while(y):
x, y = y, x % y
return x
def lcm(x, y):
lcm = (x*y)//gcd(x,y)
return lcm
num1 = int(input(“Enter first number: “))
num2 = int(input(“Enter second number: “))
print(“The L.C.M. of”, num1,”and”, num2,”is”, lcm(num1, num2))
print(“The G.C.D. of”, num1,”and”, num2,”is”, gcd(num1, num2))
| CBSE Class 12 Computer Science Boolean Logic Concepts |
| CBSE Class 12 Computer Science Computer network Assignment |
| CBSE Class 12 Computer Science Communication And Network Concepts Notes |
| CBSE Class 12 Computer Science Concept of Networking Assignment |
| CBSE Class 12 Computer Science Constructors And Destructors Concepts |
| CBSE Class 12 Computer Science Data File Handling In C++ Concepts |
| CBSE Class 12 Computer Science Data Structures Assignment |
| CBSE Class 12 Computer Science Data Structures Concepts |
| CBSE Class 12 Computer Science Data Visualization Using Pyplot Assignment |
| CBSE Class 12 Computer Science Database And SQL Concepts |
| CBSE Class 12 Computer Science Database Concepts Assignment |
| CBSE Class 12 Computer Science File Handling in Python Assignment |
| CBSE Class 12 Computer Science Functions In Python Assignment |
| CBSE Class 12 Computer Science Idea Of Efficiency Assignment |
| CBSE Class 12 Computer Science Inheritance Concepts |
| CBSE Class 12 Computer Science Interface Python with SQL Assignment |
| CBSE Class 12 Computer Science Introduction and Basics of Computers Assignment |
| CBSE Class 12 Computer Science Library Functions Assignment |
| CBSE Class 12 Computer Science Object Oriented Programming Concepts |
| CBSE Class 12 Computer Science Pointers Concepts |
| CBSE Class 12 Computer Science Programming In C++ Concepts |
| CBSE Class 12 Computer Science Revision Of The Basics Of Python Assignment |
| CBSE Class 12 Computer Science Society Law And Ethics Assignment |
| CBSE Class 12 Computer Science Structured Query Language SQL Assignment |
| CBSE Class 12 Computer Science User Defined Functions Assignment |
| CBSE Class 12 Computer Science Window Movie Maker I Assignment |
| CBSE Class 12 Computer Science Window Movie Maker II Assignment |
Important Practice Resources for Class 12 Computer Science
CBSE Class 12 Computer Science Functions In Python Assignment
Access the latest Functions In Python assignments designed as per the current CBSE syllabus for Class 12. We have included all question types, including MCQs, short answer questions, and long-form problems relating to Functions In Python. You can easily download these assignments in PDF format for free. Our expert teachers have carefully looked at previous year exam patterns and have made sure that these questions help you prepare properly for your upcoming school tests.
Benefits of solving Assignments for Functions In Python
Practicing these Class 12 Computer Science assignments has many advantages for you:
- Better Exam Scores: Regular practice will help you to understand Functions In Python properly and you will be able to answer exam questions correctly.
- Latest Exam Pattern: All questions are aligned as per the latest CBSE sample papers and marking schemes.
- Huge Variety of Questions: These Functions In Python sets include Case Studies, objective questions, and various descriptive problems with answers.
- Time Management: Solving these Functions In Python test papers daily will improve your speed and accuracy.
How to solve Computer Science Functions In Python Assignments effectively?
- Read the Chapter First: Start with the NCERT book for Class 12 Computer Science before attempting the assignment.
- Self-Assessment: Try solving the Functions In Python questions by yourself and then check the solutions provided by us.
- Use Supporting Material: Refer to our Revision Notes and Class 12 worksheets if you get stuck on any topic.
- Track Mistakes: Maintain a notebook for tricky concepts and revise them using our online MCQ tests.
Best Practices for Class 12 Computer Science Preparation
For the best results, solve one assignment for Functions In Python on daily basis. Using a timer while practicing will further improve your problem-solving skills and prepare you for the actual CBSE exam.
You can download free PDF assignments for Class 12 Computer Science Chapter Functions In Python from StudiesToday.com. These practice sheets have been updated for the 2025-26 session covering all concepts from latest NCERT textbook.
Yes, our teachers have given solutions for all questions in the Class 12 Computer Science Chapter Functions In Python assignments. This will help you to understand step-by-step methodology to get full marks in school tests and exams.
Yes. These assignments are designed as per the latest CBSE syllabus for 2026. We have included huge variety of question formats such as MCQs, Case-study based questions and important diagram-based problems found in Chapter Functions In Python.
Practicing topicw wise assignments will help Class 12 students understand every sub-topic of Chapter Functions In Python. Daily practice will improve speed, accuracy and answering competency-based questions.
Yes, all printable assignments for Class 12 Computer Science Chapter Functions In Python are available for free download in mobile-friendly PDF format.