“Computer Science Class 12 CBSE: Essential Short Answer Questions for Exams”

1. What is the difference between a list and a tuple in Python?

  • List: A list is mutable, meaning its elements can be modified after creation.
    Syntax: my_list = [1, 2, 3]
  • Tuple: A tuple is immutable, meaning its elements cannot be modified after creation.
    Syntax: my_tuple = (1, 2, 3)

2. What is the purpose of the break and continue statements in Python?

  • break: Exits the nearest enclosing loop prematurely.
    Example:

for i in range(5):
if i == 3:
break
print(i) # Output: 0, 1, 2

continue: Skips the rest of the code inside the loop for the current iteration and moves to the next iteration.
Example:

for i in range(5):
if i == 3:
continue
print(i) # Output: 0, 1, 2, 4

3. Explain the concept of encapsulation in Object-Oriented Programming.

Encapsulation is the process of bundling data (attributes) and methods (functions) into a single unit, typically a class, and restricting direct access to some of the object’s components to enforce control over how the data is accessed or modified.

4. Define foreign key and its significance in databases.

A foreign key is an attribute in one table that links to the primary key of another table. It is used to maintain referential integrity in relational databases

5. What is the difference between static and dynamic typing in programming?

  • Static Typing: Data types are checked at compile-time. Example: C, Java.
  • Dynamic Typing: Data types are checked at runtime. Example: Python, JavaScript

6. What is the role of the DNS (Domain Name System)?

The DNS translates human-readable domain names (e.g., www.example.com) into IP addresses (e.g., 192.0.2.1) that computers use to identify each other on the network.

7. Differentiate between HTTP and HTTPS.

  • HTTP: Stands for HyperText Transfer Protocol and transfers data as plain text.
  • HTTPS: Stands for HyperText Transfer Protocol Secure and encrypts data using SSL/TLS for secure communication.

8. What are logic gates? Give examples.

Logic gates are basic building blocks of digital circuits that perform logical operations like AND, OR, NOT, NAND, NOR, XOR, and XNOR.
Example:

  • AND gate: Outputs 1 only when both inputs are 1.
  • OR gate: Outputs 1 if at least one input is 1.

For More Information and Updates, Connect With Us*

Stay connected and keep learning with EEPL Classroom!

Leave a Reply

Your email address will not be published. Required fields are marked *

Company

Our ebook website brings you the convenience of instant access to a diverse range of titles, spanning genres from fiction and non-fiction to self-help, business.

Features

Most Recent Posts

  • All Post
  • Accounting
  • Biology
  • Blog
  • Blogging Tips
  • Career Advice
  • Career Development
  • Chemistry
  • Chemistry Basics
  • Chemistry Education
  • Children's Books
  • Coding and Development
  • Digital Marketing Education
  • Education
  • Education Technology
  • Education/Reference
  • Electronics
  • Energy
  • Energy & Environment
  • Energy and Environment
  • Environment
  • Environmental Awareness
  • Exam Preparation
  • Gambling Education
  • Health & Wellness
  • Health and Science
  • Information Technology
  • Language and Communication
  • Language Learning
  • Mathematics
  • Mathematics and Education
  • Mathematics and Geometry
  • Mathematics and Science
  • Mathematics Education
  • Mental Health
  • Mystery/Thriller
  • Physics
  • Physics and Technology
  • Physics Education
  • Religion/Spirituality
  • Science
  • Science & Mathematics
  • Science and Education
  • Science and Technology
  • Science Education
  • Science/Technology
  • Student Wellbeing
  • Technology
  • Technology Education
  • Technology Innovations
    •   Back
    • CBSE
    •   Back
    • JAVA

eBook App for FREE

Lorem Ipsum is simply dumy text of the printing typesetting industry lorem.

Category

Empowering futures, one student at a time. Explore our diverse range of courses designed to foster academic excellence. Join us on the journey to success with EEPL Classroom – where learning meets limitless possibilities.

© 2023 Created by Emancipation Edutech Private Limited

Important Links

Support

Contacts

Office No. 15C, Abhinandan Complex, Tharpakhna, Near Plaza Chowk, Ranchi, Jharkhand 834001

Call: +91-7488456170

Email: info@eepl.me