Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 11
Computer Science
Computer Science
Functions
Question Bank

Question Bank - Functions

Practice Hub

Question Bank: Functions

This chapter introduces functions in programming. It explains their importance in managing complexity and improving code readability.

Structured practice

Question Bank - Functions

Q1.

What is the primary purpose of using functions in programming?

Single Answer MCQ
Q-00067730
View explanation
Q2.

In the tent calculation program, what does 'csa_conical' represent?

Single Answer MCQ
Q-00067731
View explanation
Q3.

What does the program output when the height and radius of the tent are input as 3 and 4 respectively?

Single Answer MCQ
Q-00067732
View explanation
Q4.

When developing a program using functions, which of the following is a benefit?

Single Answer MCQ
Q-00067733
View explanation
Q5.

Which line of the provided program is responsible for calculating the net price after tax?

Single Answer MCQ
Q-00067734
View explanation
Q6.

What type of function can be used to calculate the area of the tent in a modular way?

Single Answer MCQ
Q-00067735
View explanation
Q7.

What is the main point of dividing a program into functions?

Single Answer MCQ
Q-00067736
View explanation
Q8.

What is the likely output if the user enters the cost of 1 m^2 canvas as 10 in the program?

Single Answer MCQ
Q-00067737
View explanation
Q9.

What is one disadvantage of writing all calculations in a single block without functions?

Single Answer MCQ
Q-00067738
View explanation
Q10.

Why is tax added at the end of the calculation program?

Single Answer MCQ
Q-00067739
View explanation
Q11.

The term 'variable scope' in programming refers to?

Single Answer MCQ
Q-00067740
View explanation
Q12.

What would happen if the value of 'h' in the program is negative?

Single Answer MCQ
Q-00067741
View explanation
Q13.

Which aspect of the tent program illustrates the importance of algorithm efficiency?

Single Answer MCQ
Q-00067742
View explanation
Q14.

How can the program improve user experience during input?

Single Answer MCQ
Q-00067743
View explanation
Q15.

In programming, what does DRY principle stand for?

Single Answer MCQ
Q-00067744
View explanation
Q16.

What is the main purpose of a function in programming?

Single Answer MCQ
Q-00067769
View explanation
Q17.

What is a void function?

Single Answer MCQ
Q-00067770
View explanation
Q18.

Which statement is used to return a value from a function?

Single Answer MCQ
Q-00067771
View explanation
Q19.

What will the function 'calcFact(5)' return based on the provided code?

Single Answer MCQ
Q-00067772
View explanation
Q20.

Which of the following is true about the parameters of a function?

Single Answer MCQ
Q-00067773
View explanation
Q21.

What will be the output of 'calcpow(2, 3)'?

Single Answer MCQ
Q-00067774
View explanation
Q22.

What is an advantage of using functions in programming?

Single Answer MCQ
Q-00067775
View explanation
Q23.

What does the 'from' statement do in importing modules?

Single Answer MCQ
Q-00067776
View explanation
Q24.

What will happen if you try to return multiple values from a function?

Single Answer MCQ
Q-00067777
View explanation
Q25.

How can you call a function defined in another module after importing it?

Single Answer MCQ
Q-00067778
View explanation
Q26.

What is the output of 'print(calcFact(0))' if the calcFact function is coded without handling for 0?

Single Answer MCQ
Q-00067779
View explanation
Q27.

Identify the error in the following function: 'def func(a, b = 5, c):'

Single Answer MCQ
Q-00067780
View explanation
Q28.

Why can functions help in managing code complexity?

Single Answer MCQ
Q-00067781
View explanation
Q29.

What does the 'def' keyword signify in Python?

Single Answer MCQ
Q-00067782
View explanation
Q30.

How do you indicate the start of a function body in Python?

Single Answer MCQ
Q-00067783
View explanation
Q31.

Which of the following is a correct way to call a user-defined function named 'calculate()'?

Single Answer MCQ
Q-00067784
View explanation
Q32.

What is the main purpose of user-defined functions?

Single Answer MCQ
Q-00067785
View explanation
Q33.

What will the following code snippet return? def add(a, b): return a + b; print(add(5, 3))

Single Answer MCQ
Q-00067786
View explanation
Q34.

In Python, what is an optional parameter in a function?

Single Answer MCQ
Q-00067787
View explanation
Q35.

What will happen if a function is called without defining it first in Python?

Single Answer MCQ
Q-00067788
View explanation
Q36.

What is returned by the function if there is no return statement in a Python function?

Single Answer MCQ
Q-00067789
View explanation
Q37.

Which of the following statements is true about local variables in functions?

Single Answer MCQ
Q-00067790
View explanation
Q38.

What is the outcome of the following code snippet? def func(): return 7; x = func(); print(x)

Single Answer MCQ
Q-00067791
View explanation
Q39.

Which of the following is an example of a parameterized function in Python?

Single Answer MCQ
Q-00067792
View explanation
Q40.

What will this function return? def check_even(num): return num % 2 == 0; print(check_even(4))

Single Answer MCQ
Q-00067793
View explanation
Q41.

When defining a function, which character will NOT be used?

Single Answer MCQ
Q-00067794
View explanation
Q42.

Which statement about recursive functions is correct?

Single Answer MCQ
Q-00067795
View explanation
Q43.

What is a potential drawback of using recursive functions?

Single Answer MCQ
Q-00067796
View explanation
Q44.

What term describes functions that can take an arbitrary number of arguments?

Single Answer MCQ
Q-00067797
View explanation
Q45.

What is the scope of a variable defined inside a function?

Single Answer MCQ
Q-00067798
View explanation
Q46.

Which of the following describes a global variable in Python?

Single Answer MCQ
Q-00067799
View explanation
Q47.

If a local variable and a global variable have the same name, which one takes precedence inside a function?

Single Answer MCQ
Q-00067800
View explanation
Q48.

What will happen if you try to access a local variable outside its function?

Single Answer MCQ
Q-00067801
View explanation
Q49.

In Python, using the keyword 'global' inside a function allows which of the following?

Single Answer MCQ
Q-00067802
View explanation
Q50.

Which Python statement would create a local variable within a function?

Single Answer MCQ
Q-00067803
View explanation
Q51.

What will be the output of accessing a global variable after modifying it inside a function?

Single Answer MCQ
Q-00067804
View explanation
Q52.

What is the main difference between local and global variables?

Single Answer MCQ
Q-00067805
View explanation
Q53.

Which of the following can cause a global variable to be overwritten?

Single Answer MCQ
Q-00067806
View explanation
Q54.

What does the term 'variable scope' refer to?

Single Answer MCQ
Q-00067807
View explanation
Q55.

Which of the following is an example of a local variable?

Single Answer MCQ
Q-00067808
View explanation
Q56.

What happens if a function does not define a variable as global before assigning a new value?

Single Answer MCQ
Q-00067809
View explanation
Q57.

In the context of Python, which statement about variable scope is false?

Single Answer MCQ
Q-00067810
View explanation
Q58.

How can a function modify the global variable without declaring it each time?

Single Answer MCQ
Q-00067811
View explanation
Q59.

Which function from the Python Standard Library is used to find the maximum value among a set of numbers?

Single Answer MCQ
Q-00067812
View explanation
Q60.

What is the purpose of the input() function in Python?

Single Answer MCQ
Q-00067813
View explanation
Q61.

Which built-in function would you use to calculate the total of a list of numbers?

Single Answer MCQ
Q-00067814
View explanation
Q62.

If a function does not return a value, what type of return does it automatically provide?

Single Answer MCQ
Q-00067816
View explanation
Q63.

Which of the following statements correctly imports a specific function from a module?

Single Answer MCQ
Q-00067818
View explanation
Q64.

What will the statement len('Python') return?

Single Answer MCQ
Q-00067820
View explanation
Q65.

What does the pow() function return when called as pow(2, 3)?

Single Answer MCQ
Q-00067822
View explanation
Q66.

When is it appropriate to use a module in Python?

Single Answer MCQ
Q-00067824
View explanation
Q67.

Which of the following built-in functions is used to find the smallest number in a sequence?

Single Answer MCQ
Q-00067826
View explanation
Q68.

What will be the output of the function call sum([1, 2, 3], 4)?

Single Answer MCQ
Q-00067828
View explanation
Q69.

Which statement about local variables is true?

Single Answer MCQ
Q-00067830
View explanation
Q70.

Which function could you use to round a number to the nearest integer?

Single Answer MCQ
Q-00067832
View explanation
Q71.

In the context of Python functions, what does 'return' do?

Single Answer MCQ
Q-00067834
View explanation
Q72.

How do you create a user-defined function in Python?

Single Answer MCQ
Q-00067836
View explanation
Learn Better On The App
Free learning flow

Learn Without Limits

Access NCERT content for free with a cleaner, faster way to revise every day.

Chapter summaries
Revision tools

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview