SET- A
VIDYA JAIN PUBLIC SCHOOL, ROHINI, NEW DELHI
PRE-BOARD EXAMINATION - 1 (2024-25)
SUBJECT – COMPUTER SCIENCE (083)
ANSWER KEY
CLASS –XII
Duration : 3 Hours M.M.:70
Q. Details of the questions Mark(s)
SECTION A
Q.1 True 1
Q.2 b. Literals 1
Q.3 d. / 1
Q.4 a. num=7.5 1
Q.5 c. mEomPU 1
Q.6 a. Binary files 1
Q.7 b. 4,5,6 1
Q.8 MANY 1
Q.9 d. readlines() 1
Q.10 b. 90 1
Q.11 False 1
Q.12 d. id() 1
Q.13 b. // 1
Q.14 a. 31 1
Q.15 d. dump() 1
Q.16 a. read() 1
Directions (Q.Nos. 17-18) Assertion and Reason based Questions.
Q.17 a. Both A and R are true and R is the correct explanation of A. 1
Q.18 a. Both A and R are true and R is the correct explanation of A. 1
SECTION B
Q.19 [15, 25, 35, 45, 55] 2
Q.20 [10, 20, [30, 40], 50, 60] 2
Q.21 A Database Management System (DBMS) offers numerous advantages for managing 2
data effectively. Here are some of the key benefits:
1. **Data Integrity and Accuracy**
- A DBMS ensures data integrity through constraints, such as primary keys, foreign
keys, and unique constraints, which help maintain accuracy and validity of the data.
2. **Data Security**
- DBMSs provide robust security measures, including user authentication,
authorization, and roles, to control access to sensitive data.
3. **Data Abstraction and Independence**
- Users can interact with data at a high level without needing to understand the
underlying complexities. Data abstraction simplifies the user experience.
4. **Efficient Data Access**
- DBMSs utilize indexing and querying techniques to optimize data retrieval, enabling
efficient access to large amounts of data.
Q.22 # Original dictionary 2
dict1 = {'a': 1, 'b': 2}
# Updating dict1 with another dictionary
dict2 = {'b': 3, 'c': 4}
dict1.update(dict2)
print(dict1) # Output: {'a': 1, 'b': 3, 'c': 4}
# Updating with an iterable of key-value pairs
dict1.update([('d', 5), ('e', 6)])
print(dict1) # Output: {'a': 1, 'b': 3, 'c': 4, 'd': 5, 'e': 6}
Q.23 L1 = [7, 2, 3, 4] 2
L2 = L1 + [2] # Correct way to add an element
L3 = L1 * 2 # This line is correct
L = L1.pop() # Removes and returns the last element (4 in this case)
Q.24 t = 'HELLO' 2
t1 = tuple(t)
print(t1)
print(t1[1:3])
('H', 'E', 'L', 'L', 'O')
('H', 'E', 'L', 'L', 'O')
('E', 'L')
Q.25 lst1 = [10, 15, 20, 25, 30] # Initial list 2
lst1.insert(3, 4) # Insert 4 at index 3
lst1.insert(2, 3) # Insert 3 at index 2
print(lst1[-5]) # Print the element at index -5
SECTION C
Q.26 To evaluate the SQL queries based on the provided `CARDEN` table, let's summarize the 3
data in the table first:
```
Ccode | CarName | Make | Color | Capacity | Charges
------- | --------- | --------- | ------ | -------- | -------
501 | A-star | Suzuki | RED | 3 | 14
503 | Indigo | Tata | SILVER | 3 | 12
502 | Innova | Toyota | WHITE | 7 | 15
509 | SX4 | Suzuki | SILVER | 4 | 14
510 | C-Class | Mercedes | RED | 4 | 35
```
### Analyzing Each Query
**i.** `SELECT COUNT(DISTINCT Make) FROM CARDEN;`
- This query counts the number of distinct car manufacturers (Make) in the table.
- The distinct `Make` values are:
- Suzuki
- Tata
- Toyota
- Mercedes
There are **4 distinct makes**.
**Output:**
```
4
```
---
**ii.** `SELECT COUNT(*) MAKE FROM CARDEN;`
- This query counts the total number of rows in the `CARDEN` table and gives it the alias
"MAKE".
- The total number of rows is **5** based on the provided data.
**Output:**
```
5
```
---
**iii.** `SELECT CarName FROM CARDEN WHERE Capacity=4;`
- This query selects the names of cars from the table where the `Capacity` is 4.
- The rows with `Capacity=4` are:
- SX4 (Make: Suzuki, Color: SILVER, Charges: 14)
- C-Class (Make: Mercedes, Color: RED, Charges: 35)
**Output:**
```
SX4
C-Class
```
### Summary of Outputs
1. For query (i): `4`
2. For query (ii): `5`
3. For query (iii):
```
SX4
C-Class
```
Q.27 To evaluate the SQL queries based on the provided `FURNITURE` table, we’ll first 3
summarize the data in the table:
```
FID | NAME | DATEOFPURCHASE | COST | DISCOUNT
------ | --------------- | --------------- | ------ | ---------
B001 | Double Bed | 03-JAN-2018 | 45000 | 10
T010 | Dinning Table | 10-MAR-2020 | 51000 | 5
B004 | Single Bed | 19-JUL-2021 | 22000 | 0
C003 | Long back Chair | 30-DEC-2016 | 12000 | 3
T006 | Console Table | 17-NOV-2019 | 15000 | 12
B006 | Bunk bed | 01-JAN-2021 | 28000 | 14
```
### Analyzing Each Query
**i.** `SELECT SUM(DISCOUNT) FROM FURNITURE WHERE COST > 15000;`
- This query calculates the total sum of the `DISCOUNT` values where the `COST` is
greater than `15000`.
- The entries that satisfy this condition are:
- Double Bed: DISCOUNT = 10
- Dinning Table: DISCOUNT = 5
- Single Bed: DISCOUNT = 0 (not considered since cost is >15000)
- Long Back Chair: DISCOUNT = 3 (not considered since cost is <=15000)
- Console Table: DISCOUNT = 12
- Bunk Bed: DISCOUNT = 14
- Therefore, we consider:
- Double Bed: 10
- Dinning Table: 5
- Bunk Bed: 14
Sum = 10 + 5 + 14 = **29**.
**Output:**
```
29
```
---
**ii.** `SELECT MAX(DATEOFPURCHASE) FROM FURNITURE;`
- This query returns the maximum date from the `DATEOFPURCHASE` column.
- The purchase dates are:
- 03-JAN-2018
- 10-MAR-2020
- 19-JUL-2021
- 30-DEC-2016
- 17-NOV-2019
- 01-JAN-2021
The latest date among these is **19-JUL-2021**.
**Output:**
```
19-JUL-2021
```
---
**iii.** `SELECT * FROM FURNITURE WHERE DISCOUNT > 5 AND FID LIKE 'T%';`
- This query retrieves all columns from the `FURNITURE` table where the `DISCOUNT` is
greater than 5 and the `FID` starts with the letter 'T'.
- The entries in the table:
- T010: DISCOUNT = 5 (does not meet condition)
- T006: DISCOUNT = 12 (meets condition)
Only the `Console Table` meets the criteria.
**Output:**
```
T006 | Console Table | 17-NOV-2019 | 15000 | 12
```
### Summary of Outputs
1. For query (i): `29`
2. For query (ii): `19-JUL-2021`
3. For query (iii):
```
T006 | Console Table | 17-NOV-2019 | 15000 | 12
```
Q.28 # Define the phonebook as a dictionary 3
phonebook = {
"Alice": "123-456-7890",
"Bob": "234-567-8901",
"Charlie": "345-678-9012"
}
def findname(name):
# Check if the name exists in the phonebook
if name in phonebook:
# Delete the phone number associated with the name
del phonebook[name]
print(f"Phone number for {name} was deleted.")
else:
print(f"{name} not found in the phonebook.")
# Example usage:
findname("Bob") # This will remove Bob's entry from the phonebook
print(phonebook) # Show the updated phonebook
findname("Daniel") # This will attempt to remove an entry that doesn't exist
Phone number for Bob was deleted.
{'Alice': '123-456-7890', 'Charlie': '345-678-9012'}
Daniel not found in the phonebook.
Q.29 class Stack: 3
def __init__(self):
"""Initialize an empty stack."""
self.stack = []
def Push(self, contents):
"""Add an item to the top of the stack."""
self.stack.append(contents)
print(f"Pushed: {contents}")
def Pop(self):
"""Remove and return the top item of the stack.
If the stack is empty, raise an exception."""
if not self.is_empty():
popped_item = self.stack.pop()
print(f"Popped: {popped_item}")
return popped_item
else:
raise IndexError("Pop from an empty stack")
def is_empty(self):
"""Check if the stack is empty."""
return len(self.stack) == 0
def peek(self):
"""Return the top item without removing it."""
if not self.is_empty():
return self.stack[-1]
else:
raise IndexError("Peek from an empty stack")
def display(self):
"""Display the current stack."""
print("Current stack:", self.stack)
# Example usage
if __name__ == "__main__":
my_stack = Stack()
# Perform Push operations
my_stack.Push(10)
my_stack.Push(20)
my_stack.Push(30)
# Display current stack
my_stack.display()
# Perform Pop operations
my_stack.Pop()
my_stack.Pop()
# Display current stack
my_stack.display()
# Peek at the current top item
print("Top item:", my_stack.peek())
# Pop the last item
my_stack.Pop()
# Attempting to Pop from an empty stack
try:
my_stack.Pop()
except IndexError as e:
print(e)
Q.30 def Del(filename="school.txt"): 3
try:
# Read the contents of the file
with open(filename, 'r') as file:
content = file.read()
# Split the content into words
words = content.split()
# Check if there are at least 4 words
if len(words) < 4:
print("The file contains less than 4 words. No deletion made.")
return
# Remove the 4th word (index 3)
removed_word = words.pop(3) # pop removes the element at index 3 (4th word)
print(f"Removed word: '{removed_word}'")
# Write the updated list of words back to the file
updated_content = ' '.join(words)
with open(filename, 'w') as file:
file.write(updated_content)
print("Updated file successfully.")
except FileNotFoundError:
print(f"The file '{filename}' does not exist.")
except Exception as e:
print(f"An error occurred: {e}")
# Example usage
if __name__ == "__main__":
Del() # Call the function to delete the 4th word from school.txt
Certainly! Below is a Python function named `Del()` that deletes the 4th word from a
text file named `school.txt`. This function reads the contents of the file, removes the
specified word, and then writes the updated contents back to the file. For the sake of
safety, it also checks whether the file exists and whether there are enough words to
delete.
Here's how you can implement this:
```python
def Del(filename="school.txt"):
try:
# Read the contents of the file
with open(filename, 'r') as file:
content = file.read()
# Split the content into words
words = content.split()
# Check if there are at least 4 words
if len(words) < 4:
print("The file contains less than 4 words. No deletion made.")
return
# Remove the 4th word (index 3)
removed_word = words.pop(3) # pop removes the element at index 3 (4th word)
print(f"Removed word: '{removed_word}'")
# Write the updated list of words back to the file
updated_content = ' '.join(words)
with open(filename, 'w') as file:
file.write(updated_content)
print("Updated file successfully.")
except FileNotFoundError:
print(f"The file '{filename}' does not exist.")
except Exception as e:
print(f"An error occurred: {e}")
# Example usage
if __name__ == "__main__":
Del() # Call the function to delete the 4th word from school.txt
```
### Explanation:
1. **Try-Except Block**: The function starts with a try-except block to handle potential
exceptions, such as a missing file.
2. **Reading the File**: The contents of the file are read into a string.
3. **Splitting Words**: The string is split into a list of words using the `.split()` method.
4. **Checking Length**: Before trying to remove the 4th word, the function checks if
there are at least 4 words.
5. **Removing the Word**: The 4th word (at index 3) is removed from the list using
`.pop(3)`.
6. **Writing Back**: The modified list of words is joined back into a string and written
back to the file, replacing its original content.
7. **Error Handling**: The function handles `FileNotFoundError` if the specified file
does not exist and prints a message in case of any other exceptions.
### Important Notes:
- Before running this function, ensure that a file named `school.txt` exists in the same
directory where you run your script, and that it contains some text with at least four
words.
- This function modifies the original file's contents directly. If you want to keep the
original file intact, consider making a copy or writing to a different file.
SECTION D
Q.31 Here are the SQL queries for each of the statements you provided: 4
### i. Display the number of distinct Scodes
To display the number of distinct `Scode` values from the `STORE` table, you can use the
following SQL query:
```sql
SELECT COUNT(DISTINCT Scode) AS Distinct_Scodes
FROM STORE;
```
### ii. Display the maximum and minimum quantities
To display the maximum and minimum quantities in the `Qty` column from the `STORE`
table, you can use this SQL query:
```sql
SELECT
MAX(Qty) AS Maximum_Quantity,
MIN(Qty) AS Minimum_Quantity
FROM STORE;
```
### iii. Display the structure of the STORE table
To display the structure (schema) of the `STORE` table, you can use the following SQL
statement. Note that the actual command may vary depending on the database system
you are using. Here are commands for different database management systems:
- **For Oracle**:
```sql
DESC STORE;
```
- **For MySQL**:
```sql
DESCRIBE STORE;
```
- **For SQL Server**:
```sql
EXEC sp_help 'STORE';
```
### iv. Add a new column Location varchar(50) in the table
To add a new column named `Location` of type `VARCHAR(50)` to the `STORE` table, you
can use the following SQL query:
```sql
ALTER TABLE STORE
ADD Location VARCHAR(50);
```
### Summary of the Queries
Here is a quick recap of what the queries do:
1. **Count Distinct Scodes**: Returns the number of distinct `Scode` values from the
table.
2. **Get Max and Min Qty**: Fetches the highest and lowest values from the `Qty`
column.
3. **Show Table Structure**: Displays the schema / structure of the `STORE` table.
4. **Add Location Column**: Adds a new column `Location` for storing item location
details with a size of 50 characters.
Make sure to execute these queries in the appropriate SQL environment where your
`STORE` table exists. Each query serves a specific purpose, so be sure they align with
your database management system's syntax.
Q.32 Sure! Below is a Python program that includes two user-defined functions: `Accept()` 4
and `Show()`, which allow you to manage employee task details stored in a CSV file
named `annual.csv`. The script uses the `csv` module for handling CSV files effectively.
Here's the complete program:
```python
import csv
import os
def Accept():
# Get employee details from the user
emp_id = input("Enter Employee ID: ")
emp_name = input("Enter Employee Name: ")
project = input("Enter Project Name: ")
duration = input("Enter Duration (in months): ")
# Prepare a list of data to write to the CSV file
employee_details = [emp_id, emp_name, project, duration]
# Check if the 'annual.csv' file exists, if not, create a new one with headers
file_exists = os.path.isfile('annual.csv')
# Open the CSV file in append mode
with open('annual.csv', mode='a', newline='') as file:
writer = csv.writer(file)
# Write the header only if file didn't exist before
if not file_exists:
writer.writerow(['emp_id', 'empName', 'project', 'duration']) # Write header
# Write employee details to the CSV file
writer.writerow(employee_details)
print("Employee details added successfully.")
def Show():
# Check if the 'annual.csv' file exists
if not os.path.isfile('annual.csv'):
print("No records found. Please add employee details first.")
return
# Open the CSV file in read mode and display the contents
with open('annual.csv', mode='r') as file:
reader = csv.reader(file)
# Read and display each row in the CSV file
for row in reader:
print(", ".join(row))
# Main program loop
if __name__ == "__main__":
while True:
print("\nMenu:")
print("1. Accept Employee Details")
print("2. Show Employee Details")
print("3. Exit")
choice = input("Enter your choice: ")
if choice == '1':
Accept()
elif choice == '2':
Show()
elif choice == '3':
print("Exiting the program.")
break
else:
print("Invalid choice. Please select again.")
```
### Explanation of the Code:
1. **Imports**: The program imports the `csv` and `os` modules. `csv` handles the CSV
file operations, while `os` checks for file existence.
2. **Accept() Function**: This function collects input from the user regarding employee
details and appends those details to `annual.csv`. If the file does not exist, it creates the
file along with the header row.
- It prompts for employee ID, employee name, project name, and duration.
- It checks if the CSV file exists, and if it does not, it writes the column headers before
appending the employee data.
3. **Show() Function**: This function reads and displays all employee details from the
`annual.csv` file.
- If the file is not found, it warns the user and suggests adding employee details first.
4. **Main Program Loop**: The `if __name__ == "__main__":` block is the entry point
of the program. It presents a simple text menu to the user. The user can choose to enter
new employee details, show existing details, or exit the program.
### Usage:
- Run the program, and you will be presented with a menu.
- You can choose to enter employee details into the CSV file or display the details that
have been entered.
This program provides a simple and functional way to manage employee task details in a
CSV format.
SECTION E
Q.33 ### i. What do you mean by file and file handling? 5
**File**: A file is a collection of data or information that is stored on a computer or
storage device. Files can be of various types, such as text files, CSV files, images, videos,
etc. Files are typically used to store information that can be retrieved and processed
later.
**File Handling**: File handling refers to the process of using programming languages
to create, read, write, and manipulate files. It involves operations such as:
- **Creating** files: Making new files that contain data or information.
- **Opening** files: Accessing existing files to read data from them or write new data
into them.
- **Reading** files: Extracting or retrieving data from files to be processed or displayed.
- **Writing** files: Adding new data or modifying existing data in files.
- **Closing** files: Finalizing file operations, which typically releases the resources
allocated for the file in the system.
File handling is crucial in programming for tasks that involve persistent data storage.
---
### ii. Python Program for `addBook()` and `countRecords()`
Below is a Python program that defines two functions: `addBook()` to write to a CSV file
named `book.csv` and `countRecords()` to count and display the total number of records
in that file.
```python
import csv
import os
def addBook():
# Get book details from the user
book_no = input("Enter Book Number: ")
book_name = input("Enter Book Name: ")
no_of_pages = input("Enter Number of Pages: ")
# Prepare a list of book details to write to the CSV file
book_details = [book_no, book_name, no_of_pages]
# Open the CSV file in append mode with tab as the delimiter
with open('book.csv', mode='a', newline='') as file:
writer = csv.writer(file, delimiter='\t') # Use tab delimiter
writer.writerow(book_details)
print("Book details added successfully.")
def countRecords():
# Check if the 'book.csv' file exists
if not os.path.isfile('book.csv'):
print("No records found. Please add book details first.")
return
# Count the number of records in the CSV file
with open('book.csv', mode='r') as file:
reader = csv.reader(file, delimiter='\t') # Use tab delimiter
record_count = sum(1 for row in reader) # Count rows
print(f"Total number of records in 'book.csv': {record_count}")
# Main program loop
if __name__ == "__main__":
while True:
print("\nMenu:")
print("1. Add Book Details")
print("2. Count Records in Book CSV")
print("3. Exit")
choice = input("Enter your choice: ")
if choice == '1':
addBook()
elif choice == '2':
countRecords()
elif choice == '3':
print("Exiting the program.")
break
else:
print("Invalid choice. Please select again.")
```
### Explanation of the Code:
1. **Imports**: The program imports the `csv` and `os` modules to handle CSV file
operations and check for file existence, respectively.
2. **addBook() Function**: This function collects book details like book number, book
name, and number of pages from user input, then appends these details to `book.csv`
using a tab delimiter.
- It takes user input for each book's details and stores them in a list.
- The CSV file is opened in append mode (`'a'`), and the `csv.writer` is used with
`delimiter='\t'` to ensure tab-separated values.
3. **countRecords() Function**: This function reads `book.csv` and counts the total
number of records (rows).
- It checks if the file exists and if not, informs the user.
- It uses a simple generator expression within `sum()` to count the total number of
rows.
4. **Main Program Loop**: The section under `if __name__ == "__main__":` provides a
simple menu-driven interface. Users can choose to add book details, count records, or
exit the program.
### Usage:
- Run the program, and you can choose to add book details or count the records stored
in `book.csv`.
- The book details will be stored in a tab-separated format.
Q.34 ### Features of Python Programming 5
Python is a widely used programming language known for its simplicity and versatility.
Here are five key features of Python:
1. **Easy to Learn and Use**:
- Python has a simple and clean syntax that is easy for beginners to learn and
understand. Its design emphasizes readability, which makes it easier to write and
maintain code.
2. **Interpreted Language**:
- Python is an interpreted language, meaning that Python code is executed line by line
at runtime. This enables developers to test snippets of code quickly without needing to
compile the entire program.
3. **Dynamically Typed**:
- Python is dynamically typed, which means that you do not need to explicitly declare
the data type of a variable when you create it. The data type is determined
automatically during runtime, allowing for flexibility in programming.
4. **Rich Standard Library**:
- Python comes with a rich set of libraries and frameworks that provide pre-written
codes for various tasks such as web development, data analysis, machine learning,
automation, and more. This extensive ecosystem accelerates development and enables
programmers to focus on application logic rather than low-level details.
5. **Cross-Platform Compatibility**:
- Python is a cross-platform language, which means that Python applications can run
on various operating systems (such as Windows, macOS, and Linux) without needing
modifications. This feature allows developers to create applications that can reach a
broader audience.
---
### Explanation of DBMS
**DBMS (Database Management System)** is a software application or system that
interacts with end users, applications, and the database itself to capture and analyze
data. It serves as an intermediary between users and databases, helping manage data in
a structured form.
#### Key Functions of a DBMS:
- **Data Storage**: Efficiently stores large amounts of data.
- **Data Retrieval**: Allows users to easily access and retrieve data.
- **Data Manipulation**: Lets users insert, update, and delete data.
- **Data Security**: Ensures that only authorized users can access or manipulate data.
- **Data Integrity**: Maintains accurate and reliable data through constraints and rules.
### Advantages of DBMS
1. **Data Integrity and Accuracy**:
- DBMS enforces rules and constraints that help maintain the accuracy and consistency
of data. It ensures that data entered into the database follows predefined rules, thus
reducing data anomalies and redundancy.
2. **Improved Data Security**:
- DBMS provides robust security mechanisms, including user authentication,
authorization, and access controls, which protect sensitive information from
unauthorized access and potential breaches.
### Limitations of DBMS
1. **Cost**:
- Implementing a DBMS can be expensive due to licensing fees, hardware
requirements, and the need for skilled personnel to manage and administer the system.
These costs can be significant, especially for small businesses.
2. **Complexity**:
- Managing a DBMS can be complex, requiring specialized knowledge for
administration, maintenance, and troubleshooting. Organizations may need to invest
time and resources in training personnel, which can be a barrier for small teams or
companies.
By understanding the features of Python or the concepts of DBMS along with their
advantages and limitations, developers and organizations can make informed decisions
about their programming and data management strategies.
Q.35 ### a. Primary Key and Alternate Key in a Database 5
1. **Primary Key**:
- A primary key is a unique identifier for a record in a database table. It ensures that no
two rows have the same value in this key column, thus maintaining the uniqueness of
each record. A primary key cannot contain `NULL` values, and it is used as a reference
for establishing relationships between tables.
- Example: In the given table `Club`, the `MemberId` could be the primary key since
each `MemberId` is unique for each member.
2. **Alternate Key**:
- An alternate key is any candidate key that is not chosen as the primary key. It is also a
unique identifier for records, but it serves as an alternative means to identify records.
Like the primary key, it also cannot contain `NULL` values.
- Example: In the `Club` table, if `MemberName` was also unique (assuming no two
members can have the same name), it could serve as an alternate key.
---
### Python Code to Delete a Record of Members Named "Sachin"
To perform operations such as deleting records from a dataset, we can use Python's
built-in constructs or libraries like `pandas`. Below is a simple example using a list of
dictionaries to represent the `Club` table, which contains member records. The code
deletes a member with the name "Sachin".
```python
# Initial data setup
club_members = [
{"MemberId": "M001", "MemberName": "Sumit", "Address": "New Delhi", "Age": 20,
"Fee": 2000},
{"MemberId": "M002", "MemberName": "Nisha", "Address": "Gurgaon", "Age": 19,
"Fee": 3500},
{"MemberId": "M003", "MemberName": "Niharika", "Address": "New Delhi", "Age":
21, "Fee": 2100},
{"MemberId": "M004", "MemberName": "Sachin", "Address": "Faridabad", "Age": 18,
"Fee": 3500}
]
# Function to delete the record of members whose name is "Sachin"
def delete_member_by_name(members, target_name):
return [member for member in members if member["MemberName"] !=
target_name]
# Deleting members named "Sachin"
club_members = delete_member_by_name(club_members, "Sachin")
# Display the updated list of members
for member in club_members:
print(member)
```
### Explanation of the Code:
1. **Data Structure**: A list named `club_members` is created with each member's
information stored as a dictionary. Each dictionary holds the keys such as "MemberId",
"MemberName", "Address", etc.
2. **Function Definition**: The `delete_member_by_name()` function:
- Accepts a list of member records and a target name to search for.
- Uses a list comprehension to create a new list that includes all members whose
names do not match the target name.
3. **Delete Operation**: The function is called with the list of current members and the
name "Sachin", and the result is stored back into `club_members`.
4. **Display**: Finally, the updated list of members is printed, showing that the record
of the member named "Sachin" has been removed successfully.
When run, this code will display the members other than "Sachin", confirming that the
deletion was performed correctly. If "Sachin" is the only record deleted, the remaining
members will remain in the output.