Test Index

CBSE Class 12 Computer Science 2024 Paper Compartment Get it on Google PlayDownload on the App Store

© examsnet.com
Question : 21 of 35
Marks: +1, -0
(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
OR
(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.
Advertisements
Go to Question: