मराठी

Science (English Medium) इयत्ता १२ - CBSE Question Bank Solutions

Advertisements
[object Object]
[object Object]
विषय
मुख्य विषय
अध्याय

Please select a subject first

Advertisements
Advertisements
< prev  6521 to 6540 of 25916  next > 

The code given below reads the following record from the table named student and displays only those records that have marks greater than 75:

  • RollNo - integer
  • Name - string
  • Clas - integer
  • Marks - integer

Note the following to establish connectivity between Python and MYSQL:

  • Username is root.
  • The password is the tiger.
  • The table exists in an MYSQL database named school.

Write the following missing statements to complete the code:

Statement 1 - to form the cursor object
Statement 2 - to execute the query that extracts records of those students whose marks are greater than 75.
Statement 3 - to read the complete result of the query (records whose marks are greater than 75) into the object named data, from the table student in the database.

import mysql.connector as mysql
def sql_data():
       con1=mysql.connect(host="localhost",user="root",password="tiger", database="school")
       mycursor=_______________ #Statement 1
       print("Students with marks greater than 75 are :")
                  _________________________ #Statement 2
                 data=__________________ #Statement 3
                for i in data:
                   print(i)
                print()
[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

Navdeep creates a table RESULT with a set of records to maintain the marks secured by students in Sem1, Sem2, Sem3, and their divisions. After the creation of the table, he entered data of 7 students in the table.

ROLL_NO SNAME SEM1 SEM2 SEM3 DIVISION
101 KARAN 366 410 402 I
102 NAMAN 300 350 325 I
103 ISHA 400 410 415 I
104 RENU 350 357 415 I
105 ARPIT 100 75 178 IV
106 SABINA 100 205 217 II
107 NEELAM 470 450 471 I

Based on the data given above answer the following questions:

  1. Identify the most appropriate column, which can be considered as the Primary key.
  2. If two columns are added and 2 rows are deleted from the table result, what will be the new degree and cardinality of the above table?
  3. Write the statements to:
    a. Insert the following record into the table
    Roll No - 108, Name - Aadit, Sem1- 470, Sem2 - 444, Sem3 - 475, Div - I.
    b. Increase the SEM2 marks of the students 3% whose name begins with ‘N’.
    OR
    Write the statements to:
    a. Delete the record of students securing IV division.
    b. Add a column REMARKS in the table with datatype as varchar with 50 characters.
[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

Advertisements

Write the command to view all databases.

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

Name any two DDL commands.

[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

The code given below deletes the record from the table employee, which contains the following record structure:

E_code - String
E_name - String
Sal - Integer
City - String

Note the following to establish connectivity between Python and MySQL:

  • Username is root
  • Password is root
  • The table exists in a MySQL database named emp.
  • The details (E_code, E_name, Sal, City) are the attributes of the table.

Write the following statements to complete the code:

Statement 1 – to import the desired library.

Statement 2 – to execute the command that deletes the record with E_code as 'E101'.

Statement 3 – to delete the record permanently from the database. ____________

import ____________ as mysql #Statement1
def delete():
      mydb=mysql.connect(host="localhost",use r="root", 
      passwd="root",database="emp")

mycursor=mydb.cursor()
____________ #Statement 2
____________ #Statement 3
print ("Record deleted") 
[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

An exception may be raised even if the program is syntactically correct.

[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

Ms Shalini has just created a table named “Employee” containing columns Ename, Department and Salary. After creating the table, she realized that she has forgotten to add a primary key column in the table. Help her in writing an SQL command to add a primary key column EmpId of integer type to the table Employee.

Thereafter, write the command to insert the following record in the table:

EmpId- 999
Ename- Shweta
Department: Production
Salary: 26900
[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

Consider the table Personal given below:

Table: Personal
P_ID Name Desig Salary Allowance
P01 Rohit Manager 89000 4800
P02 Kashish Clerk NULL 1600
P03 Mahesh Superviser 48000 NULL
P04 Salil Clerk 31000 1900
P05 Ravina Superviser NULL 2100

Based on the given table, write SQL queries for the following:

  1. Increase the salary by 5% of personals whose allowance is known.
  2. Display Name and Total Salary (sum of Salary and Allowance) of all personals. The column heading ‘Total Salary’ should also be displayed.
  3. Delete the record of Supervisors who have salary greater than 25000.
[9] Structured Query Language (SQL)
Chapter: [9] Structured Query Language (SQL)
Concept: undefined >> undefined

Define the term bandwidth with respect to networks.

[11] Data Communication
Chapter: [11] Data Communication
Concept: undefined >> undefined

Hi-Standard Tech Traj.ning Ltd. is a Mumbai based organization which is expanding its office set-up to Chennai. At Chennai office compound, they are planning to have 3 different blocks for Admin, Training and Accounts related activities. Each block has a number of computers, which are required to be connected in a network for communication, data and resource sharing.

As a network consultant, you have to suggest the best network related solutions for them for issues/problems raised by them in (i) to (iv), as per the distances between various blocks/locations and other given parameters.

Shortest differences between various blocks/locations:

Admin Block to Accounts Block 300 Metres
Accounts Block to Training Block 150 Metres
Admin Block to Training Block 200 Metres
MUMBAI Head Office to CHENNAI Office 1300 Km

The number of computers installed at various blocks is as follows:

Training Block 150
Accounts Block 30
Admin Block 40

1) Suggest the most appropriate block/location to house the SERVER in the CHENNAI office (out of the 3 blocks) to get the best and effective connectivity. Justify your answer.

2) Suggest the best-wired medium and draw the cable layout (Block to Block) to efficiently connect various blocks within the CHENNAI office compound.

3) Suggest a device/software and its placement that would provide data security for the entire network of the CHENNAI office.

4) Suggest a device and the protocol that shall be needed to provide wireless Internet access to all smartphone/laptop users in the CHENNAI office

[10] Computer Networks
Chapter: [10] Computer Networks
Concept: undefined >> undefined

Differentiate between packet switching over message switching

[10] Computer Networks
Chapter: [10] Computer Networks
Concept: undefined >> undefined

When are the following built-in exceptions raised? Give examples to support your answer.

ImportError

[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

When are the following built-in exceptions raised? Give examples to support your answer.

IOError

[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

When are the following built-in exceptions raised? Give examples to support your answer.

NameError

[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

When are the following built-in exceptions raised? Give examples to support your answer.

ZeroDivisionError

[1] Exception Handling in Python
Chapter: [1] Exception Handling in Python
Concept: undefined >> undefined

Differentiate between write() and writelines().

[2] File Handling in Python
Chapter: [2] File Handling in Python
Concept: undefined >> undefined

Consider the following lists:

List 1:

2 3 5 7 11

List 2: 

11 7 5 3 2

If the lists are sorted using Insertion sort then which of the lists List1 or List 2 will make the minimum number of comparisons? Justify using diagrammatic representation.

[5] Sorting
Chapter: [5] Sorting
Concept: undefined >> undefined

During admission in a course, the names of the students are inserted in ascending order. Thus, performing the sorting operation at the time of inserting elements in a list. Identify the type of sorting technique being used and write a program using a user defined function that is invoked every time a name is input and stores the name in ascending order of names in the list.

[5] Sorting
Chapter: [5] Sorting
Concept: undefined >> undefined

Use the hash function: h(element) = element%11 to store the collection of numbers: [44, 121, 55, 33, 110, 77, 22, 66] in a hash table. Display the hash table created. Search if the values 11, 44, 88, and 121 are present in the hash table, and display the search results.

[6] Searching
Chapter: [6] Searching
Concept: undefined >> undefined

Write a Python program by considering a mapping of the list of countries and their capital cities such as:

CountryCapital= {'India':'New Delhi','UK':
                             'London','France':'Paris',
                             'Switzerland': 'Berne',
                             'Australia': 'Canberra'}

Let us presume that our hash function is the length of the Country Name. Take two lists of appropriate size: one for keys (Country) and one for values (Capital). To put an element in the hash table, compute its hash code by counting the number of characters in the Country, then put the key and value in both lists at the corresponding indices. For example, India has a hash code of 5. So, we store India at the 5th position (index 4) in the keys list, New Delhi at the 5th position (index 4) in the values list, and so on. So that we end up with:

hash index = length of key - 1 List of Keys List of Values
0 None None
1 UK London
2 None None
3 Cuba Havana
4 India New Delhi
5 France Paris
6 None None
7 None None
8 Australia Canberra
9 None None
10 Switzerland Berne

Now search the capital of India, France, and the USA in the hash table and display your result.

[6] Searching
Chapter: [6] Searching
Concept: undefined >> undefined
< prev  6521 to 6540 of 25916  next > 
Advertisements
Advertisements
CBSE Science (English Medium) इयत्ता १२ Question Bank Solutions
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Biology
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Chemistry
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Computer Science (C++)
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Computer Science (Python)
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ English Core
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ English Elective - NCERT
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Entrepreneurship
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Geography
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Hindi (Core)
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Hindi (Elective)
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ History
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Informatics Practices
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Mathematics
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Physical Education
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Physics
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Political Science
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Psychology
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Sanskrit (Core)
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Sanskrit (Elective)
Question Bank Solutions for CBSE Science (English Medium) इयत्ता १२ Sociology
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×