Some Important Questions Cs Class 12
Some Important Questions Cs Class 12
Write definition of a method FIND(CITIES) to display all the city names from a
AHMEDABAD
Write a Python method/function Count3and7(N) to find and display the count of all those numbers
which are in between 1 and N, which are either divisible by 3 or 7.
For example: If the value of N is 15 The count should be displayed as 7 as 3,6,7,9,12,14,15 are in
between 1 to 15 which are divisible either by 3 or 7.
Ms. Shalini has just created a table named “Employee” containing columns Ename,
Department, Salary with Ename as the primary key. After creating the table, she realized that she has
forgotten to add Empid in the table. Help her in writing SQL command to add a column Empid of
integer type and set it as the primary key column.
Ms. Sharma created a table student with the following fields: Rollno, Name. While creating the table
Student, Ms. Sharma forgot to include the column Marks. Help her to write a command to insert the
Marks column with integer data type of size 3 into the Student table.
In Marks column of ‘Student’ table, for Rollno 2, the Class Teacher entered the marks as 45. However
there was a totalling error and the student has got her marks incr…
Write a method LINECOUNT() in Python to the read lines from a text file ‘STORY.TXT’ and display the
number of lines which are starting with any vowel.
Write a function ETCount() in Python, which should read the content of a text file “TESTFILE.TXT” and
then count and display the count of occurrences of alphabets E and T individually (including small
cases e and t too).
has created a CSV file named COUNTRY.CSV, to store the details of different countries. The structure
of COUNTRY.CSV is :
For efficiently maintaining data, Rohan wants to write the following user defined functions:
i. Accept() – to accept n records from the user and add it to the file COUNTRY.CSV. The column
headings should also be added on top of the CSV file.
ii. ShowRec() - To display all the records present in the CSV file named
COUNTRY.CSV
As a Python expert, help him complete the task.
Consider a file, STUDENT.DAT, containing records of the following structure: [Sid, StudentName,
Class, Marks]
Write a function, copyData(), that reads contents from the file STUDENT.DAT and copies the records
with marks above 33 to the file named PASS.DAT. The function should also return the total number of
students promoted.
Give any two points of difference between a text file and a binary file.
A Binary file, EMP.DAT has the structure: { EID:[NAME, JOB, SALARY] } Where EID – Employee id,
NAME – Employee Name, Job - Job Type and SALARY is the salary earned.
Infotainment Ltd. is an event management company with its prime office located in Bengaluru.
The company is planning to open its new division at three different locations in Chennai named as
– Vajra, Trishula and Sudershana.
You, as a networking expert need to suggest solutions to the questions in part (i) to (v), keeping IN
mind the distances and other given parameters.
(i) Suggest and draw the cable layout to efficiently connect various locations in Chennai division for
connecting the digital devices.
(ii) Which block in Chennai division should host the server ? Justify your answer.
(iii) Which fast and effective wired transmission medium should be used to connect the prime office
at Bengaluru with the Chennai division ?
(iv) Which network device will be used to connect the digital devices within each location of Chennai
division so that they may communicate with each other ?
(v) A considerable amount of data loss is noticed between different locations of the Chennai division,
which are connected in the network. Suggest a networking device that should be installed to refresh
the data and reduce the data loss during transmission to and from different locations of Chennai
division.