KnowledgeBoat Logo

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)
    

  • 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)
    

  • 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) 
    

  • Linear Lists

    Predict the output.

    b = [[9, 6], [4, 5], [7, 7]]
    x = b[:2] 
    x.append(10)
    print(x)
    

  • Linear Lists

    Predict the output.

    b = [[9, 6], [4, 5], [7, 7]]
    x = b[:2] 
    x[1].append(10)
    print(x)
    

  • SQL Queries

    Consider the table Student1 of Q. 13. Give the output of following SQL statement :

    1. SELECT TRUNCATE(AvgMark) FROM Student1 WHERE AvgMark < 75 ;
    2. SELECT ROUND(AvgMark) FROM Student1 WHERE Grade = 'B' ;
    3. SELECT CONCAT(Name, Stream) FROM Student1 WHERE Class = '12A' ;
    4. SELECT RIGHT(Stream, 2) FROM Student1 ;


  • SQL Queries

    Given the following table :

    Table : STUDENT

    No.NameStipendStreamAvgMarkGradeClass
    1Karan400.00Medical78.5B12B
    2Divakar450.00Commerce89.2A11C
    3Divya300.00Commerce68.6C12C
    4Arun350.00Humanities73.1B12C
    5Sabina500.00Nonmedical90.6A11A
    6John400.00Medical75.4B12B
    7Robert250.00Humanities64.4C11A
    8Rubina450.00Nonmedical88.5A12A
    9Vikas500.00Nonmedical92.0A12A
    10Mohan300.00Commerce67.5C12C

    Give the output of following SQL statements :

    1. SELECT MIN(AvgMark) FROM STUDENT WHERE AvgMark < 75 ;
    2. SELECT SUM(Stipend) FROM STUDENT WHERE Grade = 'B' ;
    3. SELECT AVG(Stipend) FROM STUDENT WHERE Class = '12A' ;
    4. SELECT COUNT(DISTINCT) FROM STUDENT ;

    View Answer

    18 Likes


  • SQL Joins & Grouping

    Given the following table :

    Table : CLUB

    COACH-IDCOACHNAMEAGESPORTSDATOFAPPPAYSEX
    1KUKREJA35KARATE27/03/19961000M
    2RAVINA34KARATE20/01/19981200F
    3KARAN34SQUASH19/02/19982000M
    4TARUN33BASKETBALL01/01/19981500M
    5ZUBIN36SWIMMING12/01/1998750M
    6KETAKI36SWIMMING24/02/1998800F
    7ANKITA39SQUASH20/02/19982200F
    8ZAREEN37KARATE22/02/19981100F
    9KUSH41SWIMMING13/01/1998900M
    10SHAILYA37BASKETBALL19/02/19981700M

    Give the output of following SQL statements :

    1. SELECT COUNT(DISTINCT SPORTS) FROM Club ;
    2. SELECT MIN(Age) FROM CLUB WHERE Sex = 'F' ;
    3. SELECT AVG(Pay) FROM CLUB WHERE Sports = 'KARATE' ;
    4. SELECT SUM(Pay) FROM CLUB WHERE Datofapp > '1998-01-31' ;


  • SQL Joins & Grouping

    With reference to the table below, answer the questions that follow :

    Table : Employees

    EmpidFirstnameLastnameAddressCity
    010RaviKumarRaj nagarGZB
    105HarryWaltorGandhi nagarGZB
    152SamTones33 Elm St.Paris
    215SarahAckerman440 U.S. 110Upton
    244ManilaSengupta24 Friends streetNew Delhi
    300RobertSamuel9 Fifth CrossWashington
    335RituTondonShastri NagarGZB
    400RachelLee121 Harrison St.New York
    441PeterThompson11 Red RoadParis

    Table : EmpSalary

    EmpidSalaryBenefitsDesignation
    0107500015000Manager
    1056500015000Manager
    1528000025000Director
    2157500012500Manager
    2445000012000Clerk
    3004500010000Clerk
    3354000010000Clerk
    400320007500Salesman
    441280007500Salesman

    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' ;


  • 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);


Showing 71 - 80 of 98 Questions