0% found this document useful (0 votes)
2 views4 pages

Python Answer Key Format Cie

The document outlines the internal assessment scheme and solutions for the Department of Information Science and Engineering for the Even Semester of 2023-2024. It covers various topics related to Python programming, including its features, the distinction between interpreters and compilers, and concepts of classes and exception handling. Additionally, it provides examples and marks allocation for each question.

Uploaded by

obrama59
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Python Answer Key Format Cie

The document outlines the internal assessment scheme and solutions for the Department of Information Science and Engineering for the Even Semester of 2023-2024. It covers various topics related to Python programming, including its features, the distinction between interpreters and compilers, and concepts of classes and exception handling. Additionally, it provides examples and marks allocation for each question.

Uploaded by

obrama59
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

An Autonomous Institute

NEAR ITPB, CHANNASANDRA, BENGALURU – 560 067


Affiliated to VTU, Belagavi Approved by AICTE, New Delhi
Recognized by UGC under 2(f) & 12(B) Accredited by NBA & NAAC
DEPARTMENT OF INFORMATION SCIENCE AND
ENGINEERING
Even Semester (2023-2024)
Scheme & Solutions

Internal assessment: Subject Code:

Subject Name: Semester: IV


Question Solution Marks
Number Allocated

1. Python is a high-level, versatile programming language known for its simplicity and
readability Easy to Learn and Read,Interpreted and Interactive,Cross Platform,Extensive 2M
Standard Library,Dynamic,Typing,Object Oriented,Memory,Management
any 2

2.
Interpreters and compilers are both tools used to translate high-level programming
languages into machine code or another form that a computer can execute
2M
Translation Process:

Compiler: Compilers translate the entire source code into machine code or an
intermediate language in a single batch process. The resulting executable file can be run
multiple times without needing to re-translate the code.
Interpreter: Interpreters translate source code into machine code or intermediate code
line by line, executing each line immediately after translation. There is no separate
compilation step, and the code is translated and executed on the fly.

3. type() function in Python is used to determine the type of an object or a variable. It 2M


returns the type of the object as a Python class. This function is useful in many
scenarios, including: Type Checking, Debugging,Conditional Execution,Object
Instantiation,Dynamic Programming any two
2M
4. List,Dictionaries, Tuple, Set etc any two

A class is a blueprint or template for creating objects. It defines the attributes


5. 2M
(properties) and behaviors (methods) that objects of the class will have. Essentially, a
class serves as a structure that encapsulates data and functions related to a specific
concept or entity.
An object, on the other hand, is an instance of a class. It is a concrete realization of the
class blueprint, with its own unique data and state. You can create multiple objects
(instances) of the same class, each with its own set of attributes and behaviors.
6. Exception handling in Python is a mechanism used to deal with errors or exceptional
situations that may occur during the execution of a program. It allows you to gracefully
handle errors and prevent your program from crashing unexpectedly. Python provide
2M
try:
# code block where exception might occur
# this could be any code that might raise an exception
# for example, division by zero, opening a file that doesn't exist, etc.
# if an exception occurs within this block, it will be caught by the except block
# and the program will not terminate abnormally

my_string = "Hello, World!" 2M

# Print the string


print(my_string)

8.
A file is a named location on disk to store related information. You can think of it as a
container for data. Text Files,Binary Files,Compressed Files,Compressed 2M
Files,Executable Files,Temporary Files,Log Files any two
Question Solution Marks
Number Allocated
SIGNATURE OF FACULTY HOD

You might also like