Review every matched question before generating. Flag a wrongly categorised question to
quarantine it from both study and PPT prompts until it is corrected in CBSE Paper Analyzer.
Included in reference
ID 6487 · 2021 · 1 mark(s)
Which of the following function header is correct?
a) def cal_si(p=100, r, t=2)
b) def cal_si(p=100, r=8, t)
c) def cal_si(p, r=8, t)
d) def cal_si(p, r=8, t=2)
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6488 · 2021 · 1 mark(s)
Which of the following is the correct way to call a function?
a) my_func()
b) def my_func()
c) return my_func
d) call my_func()
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6510 · 2021 · 1 mark(s)
What is the output of the following code snippet?
def ChangeVal(M,N):
for i in range(N):
if M[i]%5 == 0:
M[i]//=5
if M[i]%3 == 0:
M[i]//=3
L = [25,8,75,12]
ChangeVal(L,4)
for i in L:
print(i,end="#")
a) 5#8#15#4#
b) 5#8#5#4#
c) 5#8#15#14#
d) 5#18#15#4#
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6545 · 2022 · 2 mark(s)
Rao has written a code to input a number and check whether it is prime or not. His code is having errors. Rewrite the correct code and underline the corrections made.
def prime():
n=int(input("Enter number to check :: ")
for i in range (2, n//2):
if n%i=0:
print("Number is not prime \n")
break
else:
print("Number is prime \n')
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6105 · 2023 · 2 mark(s)
Atharva is a Python programmer working on a program to find and return the maximum value from the list. The code written below has syntactical errors. Rewrite the correct code and underline the corrections made.
def max num (L)
max=L (0)
for a in L
if a > max
max=a
return max
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6302 · 2023 · 2 mark(s)
Ravi, a Python programmer, is working on a project in which he wants to write a function to count the number of even and odd values in the list. He has written the following code but his code is having errors. Rewrite the correct code and underline the corrections made.
define EOCOUNT(L):
even_no=odd_no=0
for i in range(0,len(L))
if L[i]%2=0:
even_no+=1
Else:
odd_no+=1
print (even_no, odd_no)
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6589 · 2023 · 2 mark(s)
The code given below accepts a number as an argument and returns the reverse number. Observe the following code carefully and rewrite it after removing all syntax and logical errors. Underline all the corrections made.
define revNumber(num):
rev = 0
rem = 0
While num > 0:
rem ==num %10
rev = rev*10 + rem
num = num//10
return rev
print(revNumber(1234))
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6119 · 2023 · 3 mark(s)
Write a function EOReplace() in Python, which accepts a list L of numbers. Thereafter, it increments all even numbers by 1 and decrements all odd numbers by 1.
Example :
If Sample Input data of the list is :
L=[10,20,30,40, 35,55]
Output will be :
L=[11,21,31,41,34,54]
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6316 · 2023 · 3 mark(s)
Write a function search_replace() in Python which accepts a list L of numbers and a number to be searched. If the number exists, it is replaced by 0 and if the number does not exist, an appropriate message is displayed.
Example :
L = [10,20,30,10,40]
Number to be searched = 10
List after replacement :
L = [0,20,30,0,40]
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6347 · 2024 · 2 mark(s)
Observe the following code carefully and rewrite it after removing all syntactical errors. Underline all the corrections made.
def 1func():
a=input("Enter a number")
if a>=33
print("Promoted to next class")
ELSE:
print("Repeat")
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6348 · 2024 · 2 mark(s)
(a) Write the definition of a method/function SearchOut(Teachers, TName) to search for TName from a list Teachers, and display the position of its presence.
For example :
If the Teachers contain ["Ankit", "Siddharth", "Rahul", "Sangeeta", "rahul"] and TName contains "Rahul"
The function should display
Rahul at 2
rahul at 4
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6349 · 2024 · 2 mark(s)
(b) Write the definition of a method/function Copy_Prime(lst) to copy all the prime numbers from the list lst to another list lst_prime.
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6639 · 2024 · 2 mark(s)
The code provided below is intended to swap the first and last elements of a given tuple. However, there are syntax and logical errors in the code. Rewrite it after removing all errors. Underline all the corrections made.
def swap_first_last(tup)
if len(tup) < 2:
return tup
new_tup = (tup[-1],) + tup[1:-1] + (tup[0])
return new_tup
result = swap_first_last((1, 2, 3, 4))
print("Swapped tuple: " result)
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6182 · 2025 · 1 mark(s)
Consider the statements given below and then choose the correct output from the given options:
def Change(N):
N=N+10
print(N,end='$$')
N=15
Change(N)
print(N)
(A) 25$$15
(B) 15$$25
(C) 25$$25
(D) 2525$8
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6684 · 2025 · 2 mark(s)
The code provided below is intended to remove the first and last characters of a given string and return the resulting string. However, there are syntax and logical errors in the code.
Rewrite it after removing all the errors. Also, underline all the corrections made.
define remove_first_last(str):
if len(str) < 2:
return str
new_str = str[1:-2]
return new_str
result = remove_first_last("Hello")
Print("Resulting string: " result)
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6687 · 2025 · 2 mark(s)
A. Write a function remove_element() in Python that accepts a list L and a number n. If the number n exists in the list, it should be removed. If it does not exist, print a message saying "Element not found".
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6688 · 2025 · 2 mark(s)
B. Write a Python function add_contact() that accepts a dictionary phone_book, a name, and a phone number. The function should add the name and phone number to the dictionary. If the name already exists, print "Contact already exists" instead of updating it.
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Included in reference
ID 6246 · 2026 · 2 mark(s)
The function given below is written to accept a string s as a parameter and return the number of vowels appearing in the string. The code has certain errors. Observe the code carefully and rewrite it after removing all the logical and syntax errors. Underline all the corrections made.
def CountVowels(s):
c=0
for ch in range(s):
if 'aeiouAEIOU' in ch:
c=+1
return(ch)
Functions and Modules
→ Function definition call and return
· Concept U1_FUNCTION_DEF_RETURN
Pick a lecture from the panel on the left, configure the board and student level,
then click Generate Prompt. The result includes PYQ data,
frequency analysis, exam trends, and a full 15-section teaching package request —
ready to paste into any AI assistant.
ChatGPTClaudeGeminiDeepSeek
PYQ Analysis
Frequency, marks & high-yield concepts
Lecture Flow
Exact time-allocation plan
15 Sections
From objectives to ranked exam questions
Export
Copy or download as .txt
Reset All Progress?
This will clear all Done and Missed marks and rebuild the schedule from scratch.
A backup will be created automatically before resetting. You can restore it from the Backups page.