Write the definition of a method OddSum(NUMBERS) to add those values in the list of NUMBERS, which are odd.
def OddSum(NUMBERS):
n=len(NUMBERS)
s=0
for i in range(n):
if (i%2!=0):
s=s+NUMBERS[i]
print(s)
Sponsor Area
Structure Query Language Here is the CBSE Help.html Chapter 10 for Class 12 students. Summary and detailed explanation of the lesson, including the definitions of difficult words. All of the exercises and questions and answers from the lesson's back end have been completed. NCERT Solutions for Class 12 Help.html Structure Query Language Chapter 10 NCERT Solutions for Class 12 Help.html Structure Query Language Chapter 10 The following is a summary in Hindi and English for the academic year 2025-26. You can save these solutions to your computer or use the Class 12 Help.html.
Write the definition of a method OddSum(NUMBERS) to add those values in the list of NUMBERS, which are odd.
def OddSum(NUMBERS):
n=len(NUMBERS)
s=0
for i in range(n):
if (i%2!=0):
s=s+NUMBERS[i]
print(s)
Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables
TABLE: BOOK
Code |
BNAME |
TYPE |
F101 |
The priest |
Fiction |
L102 |
German easy |
Literature |
C101 |
Tarzan in the lost world |
Comic |
F102 |
Untold Story |
Fiction |
C102 |
War Heroes |
Comic |
MNO |
MNAME |
CODE |
ISSUEDATE |
M101 |
RAGHAV SINHA |
L102 |
2016-10-13 |
M103 |
SARTHAK JOHN |
F102 |
2017-02-23 |
M102 |
ANISHA KHAN |
C101 |
2016-06-12 |
(i) To display all details from table MEMBER in descending order of ISSUEDATE.
(ii) To display the BNO and BNAME of all Fiction Type books from the table BOOK
(iii) To display the TYPE and number of books in each TYPE from the table BOOK
(iv) To display all MNAME and ISSUEDATE of those members from table MEMBER who have books issued (i.e ISSUEDATE) in the year 2017.
(v)SELECT MAX(ISSUEDATE) FROM MEMBER;
(vi) SELECT DISTINCT TYPE FROM BOOK;
(vii) SELECT A.CODE, BNAME, MNO, MNAME FROM BOOK A, MEMBER B WHERE A.CODE=B.CODE ;
(viii) SELECT BNAME FROM BOOK
WHERE TYPE NOT IN ('FICTION', 'COMIC');
Observe the following STUDENTS and EVENTS tables carefully and write the name of the RDBMS operation which will be used to produce the output as shown in LIST? Also, find the Degree and Cardinality of the LIST.
STUDENTS
No | Name |
1 | Tara Mani |
2 | Jaya Sarkar |
3 | Tarini Trikha |
EVENTS
EVENTCODE | EVENTNAME |
1001 | Programming |
1002 | IT Quiz |
LIST
No | Name | EVENTCODE | EVENTNAME |
1 | Tara Mani | 1001 | Programming |
1 | Tara Mani | 1002 | IT Quiz |
2 | Jaya Sarkar | 1001 | Programming |
2 | Jaya Sarkar | 1002 | IT Quiz |
3 | Tarini Trikha | 1001 | Programming |
3 | Tarini Trikha | 1002 | IT Quiz |
Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii), which are based on the tables
Table: VEHICLE
CODE | VTYPE | PERKM |
101 | VOLVO BUS | 160 |
102 | AC DELUXE BUS | 150 |
103 | ORDINARY BUS | 90 |
105 | SUV | 40 |
104 | CAR | 20 |
Note:
Table: TRAVEL
NO | NAME | TDATE | KM | CODE | NOP |
101 | Janish | 2015-11-13 | 200 | 101 | 32 |
103 | Vedika Sahai | 2016-04-21 | 100 | 103 | 45 |
105 | Tarun Ram | 2016-03-23 | 350 | 102 | 42 |
102 | John Fen | 2016-02-13 | 90 | 102 | 40 |
107 | Ahmed Khan | 2015-01-10 | 75 | 104 | 2 |
104 | Raveena | 2016-05-28 | 80 | 105 | 4 |
106 | Kripal Anya | 2016-02-06 | 200 | 101 | 25 |
Note:
• NO is Traveller Number
• KM is Kilometer travelled
• NOP is number of travellers travelled in vehicle
• TDATE is Travel Date
Sponsor Area
Sponsor Area
Mock Test Series