2020 CBSE Class 12 Computer Science Question Paper with Detailed Solutions

by Himanshu Garg

 

This is the Class 12 CBSE Final Term Computer Science Question Bank. The students’ challenges are met through a set of questions and answers that cut across all topics. The questions are divided into sections including multiple choice, very short answer, short answer and long answer questions so as to enhance the revision. Detailed answers are interspersed in any patient section that can be disclosed. Use this question bank for revising the concepts, practicing important questions or preparing for the final examination.

Note: These questions are based on the latest syllabus updates and include previous year questions for reference. Ensure to review the solved examples provided to grasp complex topics with ease.

 

Section A

  1. Question: Which of the following is not a valid variable name in Python? Justify the reason for it not being a valid name.
    • (i) 5Radius
    • (ii) Radius_
    • (iii) _Radius
    • (iv) Radius
    SHOW ANSWER

    Answer: (i) 5Radius

    Reason: Variable names cannot start with a digit in Python, which is why 5Radius is invalid.

  2. Question: Which of the following are keywords in Python?
    • (i) break
    • (ii) check
    • (iii) range
    • (iv) while
    SHOW ANSWER

    Answer: (i) break, (iv) while

    Reason: These are reserved keywords in Python.

  3. Question: Name the Python Library modules which need to be imported to invoke the following functions:
    • (i) cos()
    • (ii) randint()
    SHOW ANSWER
    • (i) cos() → math
    • (ii) randint() → random
  4. Question: Rewrite the following code in Python after removing all syntax errors. Underline each correction done in the code.
    input('Enter a word', W)  
    if W = 'Hello'  
      print('Ok')  
    else:  
      print('Not Ok')
    SHOW ANSWER
    W = input('Enter a word')  # Correct input syntax  
    if W == 'Hello':           # Use '==' for comparison  
      print('Ok')  
    else:  
      print('Not Ok')
  5. Question: Find and write the output of the following Python code:
    def ChangeVal(M, N):
      for i in range(N):
        if M[i] % 5 == 0:
          M[i] //= 5
        if M[i] % 3 == 0:
          M[i] //= 3
    
    L = [25, 8, 75, 12]  
    ChangeVal(L, 4)  
    for i in L:  
      print(i, end='#')
    SHOW ANSWER
    1#8#5#4#
  6. Question: Which protocol out of the following is used to send and receive emails over a computer network?
    • (a) PPP
    • (b) HTTP
    • (c) FTP
    • (d) SMTP
    SHOW ANSWER

    Answer: (d) SMTP

    Explanation: SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending emails.

  7. Question: Find and write the output of the following Python code:
    def Call(P=40, Q=20):
        P = P + Q
        Q = P - Q
        print(P, '@', Q)
        return P
    
    R = 200
    S = 100
    R = Call(R, S)
    print(R, '@', S)
    S = Call(S)
    print(R, '@', S)
    SHOW ANSWER
    300 @ 200  
    300 @ 100  
    140 @ 20  
    300 @ 140
  8. Question: What possible output(s) are expected to be displayed on the screen at the time of execution of the program from the following code? Also specify the minimum and maximum values that can be assigned to the variable End.
    import random
    
    Colours = ["VIOLET", "INDIGO", "BLUE", "GREEN", "YELLOW", "ORANGE", "RED"]
    End = randrange(2) + 3
    Begin = randrange(End) + 1
    for i in range(Begin, End):
        print(Colours[i], end="&")
    SHOW ANSWER
    • INDIGO&BLUE&GREEN&
    • VIOLET&INDIGO&BLUE&
    • BLUE&GREEN&YELLOW&
    • GREEN&YELLOW&ORANGE&

    Minimum value of End: 3

    Maximum value of End: 4

Section B

  1. Question: Write the names of the immutable data objects from the following:
    • (i) List
    • (ii) Tuple
    • (iii) String
    • (iv) Dictionary
    SHOW ANSWER

    Answer: (ii) Tuple, (iii) String

    Reason: Tuples and strings are immutable in Python.

  2. Question: Write a Python statement to declare a Dictionary named ClassRoll with Keys as 1, 2, 3 and corresponding values as ‘Reena’, ‘Rakesh’, ‘Zareen’ respectively.
    SHOW ANSWER
    ClassRoll = {1: 'Reena', 2: 'Rakesh', 3: 'Zareen'}
  3. Question: Which of the options out of (i) to (iv) is the correct data type for the variable Vowels as defined in the following Python statement?
    Vowels = ('A', 'E', 'I', 'O', 'U')
    • (i) List
    • (ii) Dictionary
    • (iii) Tuple
    • (iv) Array
    SHOW ANSWER

    Answer: (iii) Tuple

    Reason: The variable Vowels is defined as a tuple because it is enclosed in parentheses.

  4. Question: Write the output of the following Python code:
    for i in range(2, 7, 2):
        print(i * '$')
    SHOW ANSWER
    $$  
    $$$$  
    $$$$$$
  5. Question: Write the output of the following Python code:
    def Update(X=10):
        X += 15
        print('X = ', X)
    
    X = 20
    Update()
    print('X = ', X)
    SHOW ANSWER
    X = 25  
    X = 20
  6. Question: Differentiate between w and r file modes used in Python. Illustrate the difference using suitable examples.
    SHOW ANSWER
    w mode: Opens the file for writing. If the file does not exist, it creates a new file. If it exists, it overwrites the existing content.

    r mode: Opens the file for reading. If the file does not exist, it raises an error.

    Example:

    # 'w' mode
    with open('sample.txt', 'w') as f:
        f.write('Hello, World!')
    
    # 'r' mode
    with open('sample.txt', 'r') as f:
        print(f.read())

Section C

  1. Question: Which SQL command is used to add a new attribute in a table?
    SHOW ANSWER
    Answer: ALTER TABLE table_name ADD column_name datatype;

  2. Question: Which SQL aggregate function is used to count all records of a table?
    SHOW ANSWER
    Answer: COUNT()

  3. Question: Which clause is used with a SELECT command in SQL to display the records in ascending order of an attribute?
    SHOW ANSWER
    Answer: ORDER BY

  4. Question: Write the full form of the following abbreviations:
    • (i) DDL
    • (ii) DML
    SHOW ANSWER
    • (i) DDL: Data Definition Language
    • (ii) DML: Data Manipulation Language
  5. Question: Observe the following tables, EMPLOYEES and DEPARTMENT, carefully and answer the questions that follow:
    ENOENAMEDOJDNO
    E1NUSRAT2001-11-21D3
    E2KABIR2005-10-25D1
    DNODNAME
    D1ACCOUNTS
    D2HR
    D3ADMIN
    SHOW ANSWER

    (i) What is the Degree of the table EMPLOYEES? What is the cardinality of the table DEPARTMENT?

    • Degree of EMPLOYEES: 4 (Number of columns)
    • Cardinality of DEPARTMENT: 3 (Number of rows)

    (ii) What is a Primary Key? Explain.

    Answer: A Primary Key is a unique identifier for a record in a table. It ensures that no two records can have the same value in the primary key column. In the EMPLOYEES table, ENO could be the primary key as it uniquely identifies each employee.

Section D

  1. Question: An organization purchases new computers every year and dumps the old ones into the local dumping yard. Write the name of the most appropriate category of waste that the organization is creating every year.
    SHOW ANSWER
    Answer: (iii) E-Waste (Electronic Waste)

  2. Question: Data which has no restriction of usage and is freely available to everyone under Intellectual Property Rights is categorized as:
    SHOW ANSWER
    Answer: (ii) Open Data

  3. Question: What is a Unique ID? Write the name of the Unique Identification provided by the Government of India for Indian Citizens.
    SHOW ANSWER
    Answer: A Unique ID is a unique identifier assigned to individuals for identity verification. The Unique Identification provided by the Government of India is Aadhaar.

  4. Question: Consider the following scenario and answer the questions that follow:”A student is expected to write a research paper on a topic. The student had a friend who took a similar class five years ago. The student asks his older friend for a copy of his paper and then submits the entire paper as his own research work.”
    SHOW ANSWER

    (i) Which of the following activities appropriately categorizes the act of the writer?

    • (A) Plagiarism
    • (B) Spamming
    • (C) Virus
    • (D) Phishing

    Answer: (A) Plagiarism

    (ii) Which kind of offense is made by the student?

    • (A) Cyber Crime
    • (B) Civil Crime
    • (C) Violation of Intellectual Property Rights

    Answer: (C) Violation of Intellectual Property Rights

Section E

  1. Question: Computers connected by a network across different cities is an example of _________.
    SHOW ANSWER
    Answer: (A) WAN (Wide Area Network)

  2. Question: _________ is a network tool used to test the download and upload broadband speed.
    SHOW ANSWER
    Answer: Speed Test

  3. Question: A ________ is a networking device that connects computers in a network by using packet switching to receive, and forward data to the destination.
    SHOW ANSWER
    Answer: Router

  4. Question: _________ is a network tool used to determine the path packets taken from one IP address to another.
    SHOW ANSWER
    Answer: Traceroute

  5. Question: Write the full form of the following abbreviations:
    • POP
    • VoIP
    • NFC
    • FTP
    SHOW ANSWER
    • POP: Post Office Protocol
    • VoIP: Voice over Internet Protocol
    • NFC: Near Field Communication
    • FTP: File Transfer Protocol

Disclaimer

The question bank provided on this website is meant to be a supplementary resource for final term exam preparation. While we strive to offer accurate and relevant content, students should not rely solely on these answers. It is essential to conduct further research and consult teachers, school authorities, or subject experts to ensure thorough understanding and preparation. The solutions here are based on general interpretations and may not reflect the exact responses expected by examination boards. We are not responsible for any discrepancies or outcomes in exams resulting from the use of this material. By using this resource, you acknowledge that your academic success depends on comprehensive preparation, including active engagement with school materials and guidance from educators.

Leave a Reply

[script_15]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

✓ Customized M.Tech Projects | ✓ Thesis Writing | ✓ Research Paper Writing | ✓ Plagiarism Checking | ✓ Assignment Preparation | ✓ Electronics Projects | ✓ Computer Science | ✓ AI ML | ✓ NLP Projects | ✓ Arduino Projects | ✓ Matlab Projects | ✓ Python Projects | ✓ Software Projects | ✓ Readymade M.Tech Projects | ✓ Java Projects | ✓ Manufacturing Projects M.Tech | ✓ Aerospace Projects | ✓ AI Gaming Projects | ✓ Antenna Projects | ✓ Mechatronics Projects | ✓ Drone Projects | ✓ Mtech IoT Projects | ✓ MTech Project Source Codes | ✓ Deep Learning Projects | ✓ Structural Engineering Projects | ✓ Cloud Computing Mtech Projects | ✓ Cryptography Projects | ✓ Cyber Security | ✓ Data Engineering | ✓ Data Science | ✓ Embedded Projects | ✓ AWS Projects | ✓ Biomedical Engineering Projects | ✓ Robotics Projects | ✓ Capstone Projects | ✓ Image Processing Projects | ✓ Power System Projects | ✓ Electric Vehicle Projects | ✓ Energy Projects Mtech | ✓ Simulation Projects | ✓ Thermal Engineering Projects

© 2024 All Rights Reserved Engineer’s Planet

Digital Media Partner #magdigit 

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. OK Read More

Privacy & Cookies Policy
-
00:00
00:00
Update Required Flash plugin
-
00:00
00:00