1. Home
  2. /
  3. CBSE
  4. /
  5. Class 12
  6. /
  7. Computer Science
  8. /
  9. CBSE Sample Papers Class...

CBSE Sample Papers Class 12 Computer Science 2024

myCBSEguide App

myCBSEguide App

Download the app to get CBSE Sample Papers 2023-24, NCERT Solutions (Revised), Most Important Questions, Previous Year Question Bank, Mock Tests, and Detailed Notes.

Install Now

We advise students to check Class 12 Computer Science model question papers 2023-24 on the myCBSEguide app. CBSE Sample Papers Class 12 Computer Science 2024 is now available on the CBSE official website and myCBSEguide app for free download. CBSE Sample Papers Class 12 Computer Science 2024 will have mostly subjective questions. There are 16 MCQs and 2 ARQs only. All other questions are in descriptive format. So, you have to give yourself proper time to study computer science this year.

Sample Papers of Computer Science class 12 – free PDF Download

CBSE Sample Papers Class 12 Computer Science 2024 are available for free download in myCBSEguide app and website in PDF format. CBSE Sample Papers Class 12 Computer Science With Solutions of 10+2 Computer Science are made available by the CBSE board. CBSE marking scheme and blueprint are provided along with the Sample Papers. This helps students find answers to the most frequently asked questions like how to prepare for CBSE class 12 Comp Sc board exams. Download the app today to get the latest and up-to-date study material. Here, you will get a CBSE sample paper for class 12 Computer Science with questions and answers (solution).

Sample Papers for Class 12 Computer Science 2024

Download as PDF

Sample paper 2024 class 12 Computer Science

myCBSEguide provides CBSE class 12 Board Sample Papers of Computer Science for the year 2023 with solutions in PDF format for free download. Class 12 Computer Science New Sample Papers follow the blueprint of that year only. Sample papers for class 12 Computer Science and other subjects are available for download as PDFs in the app too. myCBSEguide provides sample papers with solutions for the year 2024 for all major subjects. You can access them all on myCBSEguide Student Dashboard.

CBSE Class 12 Computer Science Sample Paper 2024

CBSE Sample Papers Class 12 Computer Science 2024

CBSE Class 12
Computer Science (Code No. 083)
(Sample Paper 2023-24)


Maximum Marks: 70
Time Allowed: 3 hours

General Instructions:

  1. Please check this question paper contains 35 questions.
  2. The paper is divided into 4 Sections- A, B, C, D and E.
  3. Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
  4. Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
  5. Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
  6. Section D, consists of 3 questions ( 31 to 33). Each question carries 5 Marks.
  7. Section E, consists of 2 questions (34 to 35). Each question carries 4 Marks. All
  8. programming questions are to be answered using Python Language only.

Computer Science Sample Paper SECTION A

  1. State True or False:
    “In a Python program, if a break statement is given in a nested loop, it terminates the execution of all loops in one go.”
  2. In a table in MYSQL database, an attribute A of datatype varchar(20) has the value “Keshav”. The attribute B of datatype char(20) has value “Meenakshi”. How many characters are occupied by attribute A and attribute B?
    1. 20,6
    2. 6,20
    3. 9,6
    4. 6,9
  3. What will be the output of the following statement:
    print(3-2**2**3+99/11)

    1. 244
    2. 244.0
    3. -244.0
    4. Error
  4. Select the correct output of the code:
    s = “Python is fun”
    l = s.split()
    s_new = “-“.join ([1[0] .upper(), 1[1], 1[2].capitalize()])
    print (s_new)
    Options:

    1. PYTHON-IS-Fun
    2. PYTHON-is-Fun
    3. Python-is-fun
    4. PYTHON-Is -Fun
  5. In MYSQL database, if a table, Alpha has degree 5 and cardinality 3, and another table, Beta has degree 3 and cardinality 5, what will be the degree and cardinality of the Cartesian product of Alpha and Beta?
    1. 5,3
    2. 8,15
    3. 3,5
    4. 15,8
  6. Riya wants to transfer pictures from her mobile phone to her laptop. She uses Bluetooth Technology to connect two devices. Which type of network will be formed in this case?
    1. PAN
    2. LAN
    3. MAN
    4. WAN
  7. Which of the following will delete key-value pair for key = “Red” from a dictionary D1?
    1. delete D1(“Red”)
    2. del D1[“Red”]
    3. del.D1[“Red”]
    4. D1.del[“Red”]
  8. Consider the statements given below and then choose the correct output from the given options:
    pride=”#G20 Presidency”
    print(pride[-2:2:-2])
    Options

    1. ndsr
    2. ceieP0
    3. ceieP
    4. yndsr
  9. Which of the following statement(s) would give an error during execution of the following code?
    tup = (20,30,40,50,80,79)
    print(tup) #Statement 1
    print(tup[3]+50) #Statement 2
    print(max(tup)) #Statement 3
    tup[4]=80 #Statement 4
    Options:

    1. Statement 1
    2. Statement 2
    3. Statement 3
    4. Statement 4
  10. What possible outputs(s) will be obtained when the following code is executed?
    import random
    myNumber=random.randint(0,3)
    COLOR=[“YELLOW”, “WHITE”, “BLACK”, “RED”] for I in COLOR:
    for J in range(1, myNumber):
    print(I, end=” * “)
    print()
    options:

    1. RED*
      WHITE*
      BLACK*
      RED*
    2. YELLOW*
      WHITE*
      BLACK*
      RED*
    3. WHITE* WHITE*
      YELLOW* YELLOW*
      BLACK* BLACK*
      RED* RED*
    4. YELLOW*
      WHITE*WHITE*
      BLACK* BLACK* BLACK*
      RED* RED* RED* RED* RED*
  11. Fill in the blank:
    The modem at the sender’s computer end acts as a ________.

    1. Model
    2. Modulator
    3. Demodulator
    4. Convertor
  12. Consider the code given below:

    Which of the following statements should be given in the blank for #Missing Statement, if the output produced is 110?
    Options:

    1. global a
    2. global b=100
    3. global b
    4. global a=100
  13. State whether the following statement is True or False:
    An exception may be raised even if the program is syntactically correct.
  14. Which of the following statements is FALSE about keys in a relational database?
    1. Any candidate key is eligible to become a primary key.
    2. A primary key uniquely identifies the tuples in a relation.
    3. A candidate key that is not a primary key is a foreign key.
    4. A foreign key is an attribute whose value is derived from the primary key of another relation.
  15. Fill in the blank:
    In case of ________ switching, before a communication starts, a dedicated path is identified between the sender and the receiver.
  16. Which of the following functions changes the position of file pointer and returns its new position?
    1. flush()
    2. tell()
    3. seek()
    4. offset()

Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is false but R is True

  1. Assertion (A): List is an immutable data type.
    Reasoning (R): When an attempt is made to update the value of an immutable variable, the old variable is destroyed and a new variable is created by the same name in memory.
  2. Assertion (A): Python standard library consists of number of modules.
    Reason (R): A function in a module is used to simplify the code and avoids repetition.

Computer Science Sample Paper  SECTION B

    1. Expand the following terms:
      POP3, URL
    2. Give one difference between XML and HTML.
  1. The code given below accepts a number as an argument and returns the reverse number. Observe the following code carefully and rewrite it after removing all syntax and logical errors. Underline all the corrections made.
    define revNumber (num):
    rev = 0
    rem = 0
    While num >0:
    rem == num % 10
    rev = rev*10 + rem
    num = num / / 10
    return rev
    print (revNumber(1234))
  2. Write a function countNow(PLACES) in Python, that takes the dictionary, PLACES as an argument and displays the names (in uppercase)of the places whose names are longer than 5 characters. For example, Consider the following dictionary
    PLACES={1:”Delhi”,2:”London”,3:”Paris”,4:”New York”,5:”Doha”}
    The output should be:
    LONDON
    NEW YORK

    OR

    Write a function, lenWords(STRING), that takes a string as an argument and returns a tuple containing length of each word of a string. For example, if the string is “Come let us have some fun”, the tuple will have (4, 3, 2, 4, 4, 3)

  3. Predict the output of the following code:
    S =”LOST”
    L = [10,21,33,4] D={}
    for I in range (len (S)):
    if I % 2==0:
    D[L.pop()]=S[I] else:
    D[L.pop()] = I+3
    for K, V in D.items():
    print(K, V, sep=”*”)
  4. Write the Python statement for each of the following tasks using BUILT-IN functions/methods only:
    1. To insert an element 200 at the third position, in the list L1
    2. To check whether a string named, message ends with a full stop / period or not.
  5. 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
  6. Predict the output of the following code:
    def Changer(P, Q=10):
    P = P/Q
    Q= p%Q
    return P
    A=200
    B=20
    A = Changer(A, B)
    print(A, B, sep =’ $ ‘)
    B=Changer(B)
    print(A, B, sep =’$’, end =’ # # # ‘)

Computer Science Sample Paper  SECTION C

  1. Predict the output of the Python code given below:
  2. Consider the table CLUB given below and write the output of the SQL queries that follow.
    CIDCNAMEAGEGENDERSPORTSPAYDOAPP
    5246AMRITA35FEMALECHESS9002006-03-27
    4687SHYAM37MALECRICKET13002004-04-15
    1245MEENA23FEMALEVOLLEYBALL10002007-06-18
    1622AMRIT28MALEKARATE10002007-09-05
    1256AMINA36FEMALECHESS11002003-08-15
    1720MANJU33FEMALEKARATE12502004-04-10
    2321VIRAT35MALECRICKET10502005-04-30
    1. SELECT COUNT(DISTINCT SPORTS) FROM CLUB;
    2. SELECT CNAME, SPORTS FROM CLUB WHERE DOAPP<“2006-04-30” AND CNAME LIKE “%NA”;
    3. SELECT CNAME, AGE, PAY FROM CLUB WHERE GENDER = “MALE” AND PAY BETWEEN 1000 AND 1200;
  3. Write a function in Python to read a text file, Alpha.txt and displays those lines which begin with the word ‘You’.
    OR

    Write a function, vowelCount() in Python that counts and displays the number of vowels in the text file named Poem.txt.

  4. Consider the table Personal given below:
    Table: Personal

    P_IDNameDesigSalaryAllowance
    P01RohitManager890004800
    P02KashishClerkNULL1600
    P03MaheshSuperviser48000NULL
    P04SalilClerk310001900
    P05RavinaSuperviserNULL2100

    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
  5. A list, NList contains following record as list elements:
    [City, Country, distance from Delhi] Each of these records are nested together to form a nested list. Write the following user defined functions in Python to perform the specified operations on the stack named travel.

    1. Push_element(NList): It takes the nested list as an argument and pushes a list object containing name of the city and country, which are not in India and distance is less than 3500 km from Delhi.
    2. Pop_element(): It pops the objects from the stack and displays them. Also, the function should display “Stack Empty” when there are no elements in the stack.
      For example: If the nested list contains the following data:
      NList=[[“New York”, “U.S.A.”, 11734], [“Naypyidaw”, “Myanmar”, 3219], [“Dubai”, “UAE”, 2194], [“London”, “England”, 6693], [“Gangtok”, “India”, 1580], [“Columbo”, “Sri Lanka”, 3405]] The stack should contain:
      [‘Naypyidaw’, ‘Myanmar’], [‘Dubai’, ‘UAE’], [‘Columbo’, ‘Sri Lanka’] The output should be:
      [‘Columbo’, ‘Sri Lanka’] [‘Dubai’, ‘UAE’] [‘Naypyidaw’, ‘Myanmar’] Stack Empty

Computer Science Sample Paper SECTION D

  1. Meticulous EduServe is an educational organization. It is planning to setup its India campus at Chennai with its head office at Delhi. The Chennai campus has 4 main buildings – ADMIN, ENGINEERING, BUSINESS and MEDIA.

    Block to Block distances (in Mtrs.)

    FromToDistance
    ADMINENGINEERING55 m
    ADMINBUSINESS90 m
    ADMINMEDIA50 m
    ENGINEERINGBUSINESS55 m
    ENGINEERINGMEDIA50 m
    BUSINESSMEDIA45 m
    DELHI HEAD
    OFFICE
    CHENNAI
    CAMPUS
    2175 km

    Number of computers in each of the blocks/Center is as follows:

    ADMIN110
    ENGINEERING75
    BUSINESS40
    MEDIA12
    DELHI HEAD20
    1. Suggest and draw the cable layout to efficiently connect various blocks of buildings within the CHENNAI campus for connecting the digital devices.
    2. Which network device will be used to connect computers in each block to form a local area network?
    3. Which block, in Chennai Campus should be made the server? Justify your answer.
    4. Which fast and very effective wireless transmission medium should preferably be used to connect the head office at DELHI with the campus in CHENNAI?
    5. Suggest a device/software to be installed in the CHENNAI Campus to take care of data security.
    1. Differentiate between r+ and w+ file modes in Python.
    2. Consider a file, SPORT.DAT, containing records of the following structure:
      [SportName, TeamName, No_Players] Write a function, copyData(), that reads contents from the file SPORT.DAT and copies the records with Sport name as “Basket Ball” to the file named BASKET.DAT. The function should return the total number of records copied to the file BASKET.DAT.
    OR
    (Option for part (ii) only)

    A Binary file, CINEMA.DAT has the following structure:
    {MNO:[MNAME, MTYPE]}
    Where
    MNO – Movie Number
    MNAME – Movie Name
    MTYPE is Movie Type
    Write a user defined function, findType(mtype), that accepts mtype as parameter and displays all the records from the binary file CINEMA.DAT, that have the value of Movie Type as mtype.

    1. Define the term Domain with respect to RDBMS. Give one example to support your answer.
    2. Kabir wants to write a program in Python to insert the following record in the table named Student in MYSQL database, SCHOOL:
      • rno(Roll number )- integer
      • name(Name) – string
      • DOB (Date of birth) – Date
      • Fee – float

      Note the following to establish connectivity between Python and MySQL:

      • Username – root
      • Password – tiger
      • Host – localhost
        The values of fields rno, name, DOB and fee has to be accepted from the user. Help Kabir to write the program in Python.

Computer Science Sample Paper SECTION E

  1. Consider the tables PRODUCT and BRAND given below:
    Table: PRODUCT

    PCodePNameUPriceRatingBID
    P01Shampoo1206M03
    P02Toothpaste548M02
    P03Soap257M03
    P04Toothpaste654M04
    P05Soap385M05
    P06Shampoo2456M05

    Table: BRAND

    BIDBName
    M02Dant Kanti
    M03Medimix
    M04Pepsodent
    M05Dove

    Write SQL queries for the following:

    1. Display product name and brand name from the tables PRODUCT and BRAND.
    2. Display the structure of the table PRODUCT.
    3. Display the average rating of Medimix and Dove brands
    4. Display the name, price, and rating of products in descending order of rating.
  2. Vedansh is a Python programmer working in a school. For the Annual Sports Event, he has created a csv file named Result.csv, to store the results of students in different sports events. The structure of Result.csv is:
    [St_Id, St_Name, Game_Name, Result] Where
    St_Id is Student ID (integer)
    ST_name is Student Name (string)
    Game_Name is name of game in which student is participating(string)
    Result is result of the game whose value can be either ‘Won’, ‘Lost’ or ‘Tie’
    For efficiently maintaining data of the event, Vedansh wants to write the following user defined functions:
    Accept() – to accept a record from the user and add it to the file Result.csv. The column headings should also be added on top of the csv file.
    wonCount() – to count the number of students who have won any event. As a Python expert, help him complete the task.

These are questions only. To view and download the complete question paper with the solution install myCBSEguide App from Google Play Store or login to our student dashboard.

Download myCBSEguide App

CBSE Sample Papers for Class 12

To download sample papers for class 12 Physics, Chemistry, Biology, History, Political Science, Economics, Geography, Computer Science, Home Science, Accountancy, Business Studies and Home Science; do check the myCBSEguide app or website. myCBSEguide provides sample papers with solutions, test papers for chapter-wise practice, NCERT solutions, NCERT Exemplar solutions, quick revision notes for ready reference, CBSE guess papers and CBSE important question papers. Sample Papers all are made available through the best app for CBSE students and the myCBSEguide website.

myCBSEguide App

Test Generator

Create question paper PDF and online tests with your own name & logo in minutes.

Create Now
myCBSEguide App

myCBSEguide

Question Bank, Mock Tests, Exam Papers, NCERT Solutions, Sample Papers, Notes

Install Now

2 thoughts on “CBSE Sample Papers Class 12 Computer Science 2024”

Leave a Comment