0% found this document useful (0 votes)
184 views27 pages

Class 11 Question Bank Computer Science Chap 7 (2024-25)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views27 pages

Class 11 Question Bank Computer Science Chap 7 (2024-25)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

QUESTION BANK

CLASS - XITH
SUBJECT – COMPUTRR SCIENCE
CHAPTER – 7 FUNCTIONS

Multiple-Choice Questions (MCQs)


1. What is the main purpose of a function in Python?
o a) To store multiple values
o b) To group statements that perform a task
o c) To iterate over sequences
o d) To create data structures
Answer: b) To group statements that perform a task
2. Which of the following is NOT a type of function in Python?
o a) User-defined function
o b) Built-in function
o c) Anonymous function
o d) Static function
Answer: d) Static function
3. How can a function return a value in Python?
o a) Using a print statement
o b) Using a return statement
o c) Using an assignment statement
o d) Using a function call
Answer: b) Using a return statement
4. What will happen if you call a function without providing the required parameters?
o a) The function will return None
o b) An error will occur
o c) The function will execute without parameters
o d) The function will skip that parameter
Answer: b) An error will occur

5. What is a function’s return type?


o a) The type of input passed to the function
o b) The type of value returned by the function
o c) The name of the function
o d) The number of arguments the function takes
Answer: b) The type of value returned by the function

Short Answer Questions


1. What is a function in Python?
o Answer: A function is a block of reusable code that is used to perform a
specific task. Functions allow for modular and organized code.
2. Explain the use of the return statement in functions.
o Answer: The return statement is used in a function to send back a result to
the caller. It allows the function to output a value.
3. What is a parameter in a function?
o Answer: A parameter is a variable listed in the function definition. It serves
as a placeholder for the values passed to the function during its call.
4. Define a function header and body.
o Answer: The function header is the first line of the function, which includes
the function name and parameters. The body contains the statements that
define what the function does.
5. What is the difference between a function call and a function definition?
o Answer: A function definition is the process of creating a function by
specifying its name, parameters, and body. A function call is the act of
executing the function by using its name.

Long Answer Questions


1. Explain the concept of function definition and function call in Python.
o Answer: Function definition involves declaring a function by specifying its
name, parameters, and body of code. The function is executed when it is
called, which is done by using the function’s name followed by parentheses.
Parameters can be passed during the function call, which are then used
inside the function’s body to perform tasks.
2. Discuss the types of functions in Python.
o Answer: There are mainly three types of functions in Python:
 Built-in Functions: These are pre-defined in Python, such as print(),
len(), etc.
 User-Defined Functions: These are functions created by the user
using the def keyword.
 Lambda Functions: These are anonymous functions created using the
lambda keyword for short, single-expression tasks.
3. What are positional and keyword arguments in Python functions?
o Answer:
 Positional Arguments are arguments that are passed to a function in
the correct order.
 Keyword Arguments are arguments that are passed by explicitly
specifying the name of the parameter, allowing for a flexible order of
arguments.
4. What is function overloading in Python? Can it be implemented?
o Answer: Function overloading refers to defining multiple functions with the
same name but with different parameters. Python does not support
traditional function overloading like other languages. However, function
behavior can be mimicked using default arguments or variable-length
argument lists.
5. What are default arguments in a function? Explain their usage with an example.
o Answer: Default arguments are values that are assigned to parameters if no
argument is passed during the function call. These allow the function to have
optional parameters. For example, in a function def greet(name="Guest"):, if
no argument is passed, name defaults to "Guest".

Case Study Based Questions


1. Case Study:
A software development company is building a library management system. The
system has a function that calculates the late fee for books based on the number
of days overdue. The function takes two arguments: the daily fee and the number
of overdue days. The company wants to calculate and return the late fee.
Question: Write a function that takes the daily fee and overdue days as parameters,
calculates the late fee, and returns the result.
Answer:

2. Case Study:
In a hotel booking system, a function is used to check the availability of rooms.
The function receives a check-in date and a check-out date. The system needs to
determine if the rooms are available for the entire duration of the stay. The
function returns True if rooms are available, otherwise, it returns False.
Question: Write the function that checks room availability based on check-in and check-
out dates.
Answer:

3. Case Study:
A company wants to calculate the total salary of its employees. The company has
a basic pay and an overtime pay rate. A function needs to take both the basic pay
and overtime hours worked as parameters and return the total salary.
Question: Write a function that calculates the total salary based on basic pay and
overtime hours worked.
Answer:
4. Case Study:
A company is working on an order system. The system has a function to calculate
the discount for a customer. The discount rate depends on the total amount of the
order: if the order amount is more than $500, a 10% discount is applied; otherwise,
no discount is applied.
Question: Write the function to calculate the discount based on the order amount.
Answer:

5. Case Study:
A store wants to calculate the final price of an item after applying a discount. The
function should take the original price and the discount percentage as parameters
and return the final price.
Question: Write a function to calculate the final price after applying the discount.
Answer:
Dear Teachers and Students,

Join School of Educators' exclusive WhatsApp, Telegram, and Signal groups for FREE access
to a vast range of educational resources designed to help you achieve 100/100 in exams!
Separate groups for teachers and students are available, packed with valuable content to
boost your performance.

Additionally, benefit from expert tips, practical advice, and study hacks designed to enhance
performance in both CBSE exams and competitive entrance tests.

Don’t miss out—join today and take the first step toward academic excellence!

Join the Teachers and Students


Group by Clicking the Link Below
JOIN OUR
WHATSAPP
GROUPS
FOR FREE EDUCATIONAL
RESOURCES
JOIN SCHOOL OF EDUCATORS WHATSAPP GROUPS
FOR FREE EDUCATIONAL RESOURCES
We are thrilled to introduce the School of Educators WhatsApp Group, a
platform designed exclusively for educators to enhance your teaching & Learning
experience and learning outcomes. Here are some of the key benefits you can
expect from joining our group:

BENEFITS OF SOE WHATSAPP GROUPS

Abundance of Content: Members gain access to an extensive repository of


educational materials tailored to their class level. This includes various formats such
as PDFs, Word files, PowerPoint presentations, lesson plans, worksheets, practical
tips, viva questions, reference books, smart content, curriculum details, syllabus,
marking schemes, exam patterns, and blueprints. This rich assortment of resources
enhances teaching and learning experiences.

Immediate Doubt Resolution: The group facilitates quick clarification of doubts.


Members can seek assistance by sending messages, and experts promptly respond
to queries. This real-time interaction fosters a supportive learning environment
where educators and students can exchange knowledge and address concerns
effectively.

Access to Previous Years' Question Papers and Topper Answers: The group
provides access to previous years' question papers (PYQ) and exemplary answer
scripts of toppers. This resource is invaluable for exam preparation, allowing
individuals to familiarize themselves with the exam format, gain insights into scoring
techniques, and enhance their performance in assessments.
Free and Unlimited Resources: Members enjoy the benefit of accessing an array of
educational resources without any cost restrictions. Whether its study materials,
teaching aids, or assessment tools, the group offers an abundance of resources
tailored to individual needs. This accessibility ensures that educators and students
have ample support in their academic endeavors without financial constraints.

Instant Access to Educational Content: SOE WhatsApp groups are a platform where
teachers can access a wide range of educational content instantly. This includes study
materials, notes, sample papers, reference materials, and relevant links shared by
group members and moderators.

Timely Updates and Reminders: SOE WhatsApp groups serve as a source of timely
updates and reminders about important dates, exam schedules, syllabus changes, and
academic events. Teachers can stay informed and well-prepared for upcoming
assessments and activities.

Interactive Learning Environment: Teachers can engage in discussions, ask questions,


and seek clarifications within the group, creating an interactive learning environment.
This fosters collaboration, peer learning, and knowledge sharing among group
members, enhancing understanding and retention of concepts.

Access to Expert Guidance: SOE WhatsApp groups are moderated by subject matter
experts, teachers, or experienced educators can benefit from their guidance,
expertise, and insights on various academic topics, exam strategies, and study
techniques.

Join the School of Educators WhatsApp Group today and unlock a world of resources,
support, and collaboration to take your teaching to new heights. To join, simply click
on the group links provided below or send a message to +91-95208-77777 expressing
your interest.

Together, let's empower ourselves & Our Students and


inspire the next generation of learners.

Best Regards,
Team
School of Educators
Join School of Educators WhatsApp Groups

You will get Pre- Board Papers PDF, Word file, PPT, Lesson Plan, Worksheet, practical
tips and Viva questions, reference books, smart content, curriculum, syllabus,
marking scheme, toppers answer scripts, revised exam pattern, revised syllabus,
Blue Print etc. here . Join Your Subject / Class WhatsApp Group.

Kindergarten to Class XII (For Teachers Only)

Class 1 Class 2 Class 3

Class 4 Class 5 Class 6

Class 7 Class 8 Class 9

Class 10 Class 11 (Science) Class 11 (Humanities)

Class 11 (Commerce) Class 12 (Science) Class 12 (Humanities)

Class 12 (Commerce) Kindergarten


Subject Wise Secondary and Senior Secondary Groups
(IX & X For Teachers Only)
Secondary Groups (IX & X)

SST Mathematics Science

English Hindi-A IT Code-402

Hindi-B Artificial Intelligence

Senior Secondary Groups (XI & XII For Teachers Only)

Physics Chemistry English

Mathematics Biology Accountancy

Economics BST History


Geography Sociology Hindi Elective

Hindi Core Home Science Sanskrit

Psychology Political Science Painting

Vocal Music Comp. Science IP

Physical Education APP. Mathematics Legal Studies

Entrepreneurship French IT

Artificial Intelligence

Other Important Groups (For Teachers & Principal’s)

Principal’s Group Teachers Jobs IIT/NEET


Join School of Educators WhatsApp Groups

You will get Pre- Board Papers PDF, Word file, PPT, Lesson Plan, Worksheet, practical
tips and Viva questions, reference books, smart content, curriculum, syllabus,
marking scheme, toppers answer scripts, revised exam pattern, revised syllabus,
Blue Print etc. here . Join Your Subject / Class WhatsApp Group.

Kindergarten to Class XII (For Students Only)

Class 1 Class 2 Class 3

Class 4 Class 5 Class 6

Class 7 Class 8 Class 9

Class 10 Class 11 (Science) Class 11 (Humanities)

Class 11 (Commerce) Class 12 (Science) Class 12 (Humanities)

Class 12 (Commerce) Artificial Intelligence


(VI TO VIII)
Subject Wise Secondary and Senior Secondary Groups
(IX & X For Students Only)
Secondary Groups (IX & X)

SST Mathematics Science

English Hindi IT Code

Artificial Intelligence

Senior Secondary Groups (XI & XII For Students Only)

Physics Chemistry English

Mathematics Biology Accountancy

Economics BST History


Geography Sociology Hindi Elective

Hindi Core Home Science Sanskrit

Psychology Political Science Painting

Music Comp. Science IP

Physical Education APP. Mathematics Legal Studies

Entrepreneurship French IT

AI IIT/NEET CUET
Groups Rules & Regulations:
To maximize the benefits of these WhatsApp groups, follow these guidelines:

1. Share your valuable resources with the group.


2. Help your fellow educators by answering their queries.
3. Watch and engage with shared videos in the group.
4. Distribute WhatsApp group resources among your students.
5. Encourage your colleagues to join these groups.

Additional notes:
1. Avoid posting messages between 9 PM and 7 AM.
2. After sharing resources with students, consider deleting outdated data if necessary.
3. It's a NO Nuisance groups, single nuisance and you will be removed.
No introductions.
No greetings or wish messages.
No personal chats or messages.
No spam. Or voice calls
Share and seek learning resources only.

Please only share and request learning resources. For assistance,


contact the helpline via WhatsApp: +91-95208-77777.
Join Premium WhatsApp Groups
Ultimate Educational Resources!!

Join our premium groups and just Rs. 1000 and gain access to all our exclusive
materials for the entire academic year. Whether you're a student in Class IX, X, XI, or
XII, or a teacher for these grades, Artham Resources provides the ultimate tools to
enhance learning. Pay now to delve into a world of premium educational content!

Click here for more details

Class 9 Class 10 Class 11

Class 12

📣 Don't Miss Out! Elevate your academic journey with top-notch study materials and secure
your path to top scores! Revolutionize your study routine and reach your academic goals with
our comprehensive resources. Join now and set yourself up for success! 📚🌟

Best Wishes,

Team
School of Educators & Artham Resources
SKILL MODULES BEING OFFERED IN
MIDDLE SCHOOL

Artificial Intelligence Beauty & Wellness Design Thinking & Financial Literacy
Innovation

Handicrafts Information Technology Marketing/Commercial Mass Media - Being Media


Application Literate

Data Science (Class VIII Augmented Reality /


Travel & Tourism Coding
only) Virtual Reality

Digital Citizenship Life Cycle of Medicine & Things you should know What to do when Doctor
Vaccine about keeping Medicines is not around
at home

Humanity & Covid-19 Blue Pottery Pottery Block Printing


Food Food Preservation Baking Herbal Heritage

Khadi Mask Making Mass Media Making of a Graphic


Novel

Kashmiri Embroidery Satellites


Rockets
Embroidery

Application of Photography
Satellites
SKILL SUBJECTS AT SECONDARY LEVEL (CLASSES IX – X)

Retail Information Technology Automotive


Security

Introduction To Financial Introduction To Tourism Beauty & Wellness Agriculture


Markets

Food Production Front Office Operations Banking & Insurance Marketing & Sales

Health Care Apparel Multi Media Multi Skill Foundation


Course

Artificial Intelligence
Physical Activity Trainer Electronics & Hardware
Data Science
(NEW)

Foundation Skills For Sciences Design Thinking & Innovation (NEW)


(Pharmaceutical & Biotechnology)(NEW)
SKILL SUBJECTS AT SR. SEC. LEVEL
(CLASSES XI – XII)

Retail InformationTechnology Web Application Automotive

Financial Markets Management Tourism Beauty & Wellness Agriculture

Food Production Front Office Operations Banking Marketing

Health Care Insurance Horticulture Typography & Comp.


Application

Geospatial Technology Electrical Technology Electronic Technology Multi-Media


Taxation Cost Accounting Office Procedures & Shorthand (English)
Practices

Shorthand (Hindi) Air-Conditioning & Medical Diagnostics Textile Design


Refrigeration

Salesmanship Business Food Nutrition &


Design
Administration Dietetics

Mass Media Studies Library & Information Fashion Studies Applied Mathematics
Science

Yoga Early Childhood Care & Artificial Intelligence Data Science


Education

Physical Activity Land Transportation Electronics & Design Thinking &


Trainer(new) Associate (NEW) Hardware (NEW) Innovation (NEW)
Join School of Educators Signal Groups

You will get Pre- Board Papers PDF, Word file, PPT, Lesson Plan, Worksheet, practical
tips and Viva questions, reference books, smart content, curriculum, syllabus,
marking scheme, toppers answer scripts, revised exam pattern, revised syllabus,
Blue Print etc. here . Join Your Subject / Class signal Group.

Kindergarten to Class XII

Class 2 Class 3
Class 1

Class 5 Class 6
Class 4

Class 7 Class 8 Class 9

Class 10 Class 11 (Science) Class 11 (Humanities)

Class 11 (Commerce) Class 12 (Science) Class 12 (Humanities)

Class 12 (Commerce) Kindergarten Artifical intelligence


Subject Wise Secondary and Senior Secondary
Groups IX & X

Secondary Groups (IX & X)

SST Mathematics Science

Hindi-B
English Hindi-A

IT Artifical intelligence
IT Code-402

Senior Secondary Groups XI & XII

Physics Chemistry English

Biology Accountancy
Mathematics

BST History
Economics
Geography Sociology Hindi Elective

Hindi Core Home Science Sanskrit

Psychology Political Science Painting

IP
Vocal Music Comp. Science

Physical Education APP. Mathematics Legal Studies

IIT/NEET
Entrepreneurship French

Artifical intelligence CUET


Join School of Educators CBSE Telegram Groups

Kindergarten

All classes Class 1 Class 2

Class 3 Class 4 Class 5

Class 6 Class 7 Class 8

Class 9 Class 10 Class 11 (Sci)

Class 11 (Com) Class 11 (Hum) Class 12 (Sci)

Class 12 (Com) Class 12 (Hum) JEE/NEET

CUET NDA, OLYMPIAD, NTSE Principal Professional Group

Teachers Professional Group Project File Group


Join School of Educators ICSE Telegram Groups

Kindergarten Class 1 Class 2

Class 3 Class 4 Class 5

Class 6 Class 7 Class 8

Class 9 Class 10 Class 11 (Sci)

Class 11 (Com) Class 11 (Hum) Class 12 (Sci)

Class 12 (Com) Class 12 (Hum)

You might also like