Class - 12 CBSE Computer Science Important Output Questions 2025
Linear Lists
Predict the output :
ages = [11, 14, 15, 17, 13, 18, 25] print(ages) Elig = [x for x in ages if x in range(14, 18)] print(Elig)
View Answer2 Likes
Linear Lists
Predict the output :
L1= [x ** 2 for x in range(10) if x % 3 == 0] L2 = L1 L1.append(len(L1)) print(L1) print(L2) L2.remove(len(L2) - 1) print(L1)
View Answer1 Likes
Linear Lists
Predict the output :
def even(n): return n % 2 == 0 list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9] ev = [n for n in list1 if n % 2 == 0] evp = [n for n in list1 if even(n)] print(evp)
View Answer2 Likes
Linear Lists
Predict the output.
b = [[9, 6], [4, 5], [7, 7]] x = b[:2] x.append(10) print(x)
View Answer2 Likes
Linear Lists
Predict the output.
b = [[9, 6], [4, 5], [7, 7]] x = b[:2] x[1].append(10) print(x)
View Answer1 Likes
SQL Queries
Consider the table Student1 of Q. 13. Give the output of following SQL statement :
- SELECT TRUNCATE(AvgMark) FROM Student1 WHERE AvgMark < 75 ;
- SELECT ROUND(AvgMark) FROM Student1 WHERE Grade = 'B' ;
- SELECT CONCAT(Name, Stream) FROM Student1 WHERE Class = '12A' ;
- SELECT RIGHT(Stream, 2) FROM Student1 ;
View Answer9 Likes
SQL Queries
Given the following table :
Table : STUDENT
No. Name Stipend Stream AvgMark Grade Class 1 Karan 400.00 Medical 78.5 B 12B 2 Divakar 450.00 Commerce 89.2 A 11C 3 Divya 300.00 Commerce 68.6 C 12C 4 Arun 350.00 Humanities 73.1 B 12C 5 Sabina 500.00 Nonmedical 90.6 A 11A 6 John 400.00 Medical 75.4 B 12B 7 Robert 250.00 Humanities 64.4 C 11A 8 Rubina 450.00 Nonmedical 88.5 A 12A 9 Vikas 500.00 Nonmedical 92.0 A 12A 10 Mohan 300.00 Commerce 67.5 C 12C Give the output of following SQL statements :
- SELECT MIN(AvgMark) FROM STUDENT WHERE AvgMark < 75 ;
- SELECT SUM(Stipend) FROM STUDENT WHERE Grade = 'B' ;
- SELECT AVG(Stipend) FROM STUDENT WHERE Class = '12A' ;
- SELECT COUNT(DISTINCT) FROM STUDENT ;
View Answer18 Likes
SQL Joins & Grouping
Given the following table :
Table : CLUB
COACH-ID COACHNAME AGE SPORTS DATOFAPP PAY SEX 1 KUKREJA 35 KARATE 27/03/1996 1000 M 2 RAVINA 34 KARATE 20/01/1998 1200 F 3 KARAN 34 SQUASH 19/02/1998 2000 M 4 TARUN 33 BASKETBALL 01/01/1998 1500 M 5 ZUBIN 36 SWIMMING 12/01/1998 750 M 6 KETAKI 36 SWIMMING 24/02/1998 800 F 7 ANKITA 39 SQUASH 20/02/1998 2200 F 8 ZAREEN 37 KARATE 22/02/1998 1100 F 9 KUSH 41 SWIMMING 13/01/1998 900 M 10 SHAILYA 37 BASKETBALL 19/02/1998 1700 M Give the output of following SQL statements :
- SELECT COUNT(DISTINCT SPORTS) FROM Club ;
- SELECT MIN(Age) FROM CLUB WHERE Sex = 'F' ;
- SELECT AVG(Pay) FROM CLUB WHERE Sports = 'KARATE' ;
- SELECT SUM(Pay) FROM CLUB WHERE Datofapp > '1998-01-31' ;
View Answer5 Likes
SQL Joins & Grouping
With reference to the table below, answer the questions that follow :
Table : Employees
Empid Firstname Lastname Address City 010 Ravi Kumar Raj nagar GZB 105 Harry Waltor Gandhi nagar GZB 152 Sam Tones 33 Elm St. Paris 215 Sarah Ackerman 440 U.S. 110 Upton 244 Manila Sengupta 24 Friends street New Delhi 300 Robert Samuel 9 Fifth Cross Washington 335 Ritu Tondon Shastri Nagar GZB 400 Rachel Lee 121 Harrison St. New York 441 Peter Thompson 11 Red Road Paris Table : EmpSalary
Empid Salary Benefits Designation 010 75000 15000 Manager 105 65000 15000 Manager 152 80000 25000 Director 215 75000 12500 Manager 244 50000 12000 Clerk 300 45000 10000 Clerk 335 40000 10000 Clerk 400 32000 7500 Salesman 441 28000 7500 Salesman Give the Output of following SQL commands :
(i) Select firstname, Salary from Employees, Empsalary where Designation = 'Salesman' and Employees.Empid = Empsalary.Empid ;
(ii) Select count(distinct designation) from EmpSalary ;
(iii) Select designation, sum(salary) from EmpSalary group by designation having count(*) > 2 ;
(iv) Select sum(Benefits) from EmpSalary where Designation = 'Clerk' ;
View Answer5 Likes
SQL Queries
Write the output produced by the following SQL statements:
(a)
SELECT POW(2, 3);
(b)
SELECT ROUND(342.9234, -1);
(c)
SELECT LENGTH("Informatics Practices");
(d)
SELECT YEAR("1979/11/26"), MONTH("1979/11/26"), DAY("1979/11/26"), MONTHNAME("1979/11/26");
(e)
SELECT LEFT("INDIA", 3), RIGHT("ComputerScience", 4), MID("Informatics", 3, 4), SUBSTR("Practices", 3);
View Answer1 Likes
Showing 71 - 80 of 98 Questions