Unit 1ST Model Answer (PWP)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

NIT POLYTECHNIC ,NAGPUR

MODEL ANSWER PAPER


DEPARTMENT: COMPUTER ENGINEERING B/S/M:CO6I COURSE:PWP(PYTHON)
NAME OF EXAM:

Write Question first then , write the answer as per the note Remark on Answer in
Qus. Stepwise Hindi only to obtain
No. given below marks full mark

UNIT: 1(Introduction and Syntax of Python Program) 08M

Note :- Read and understand the question and write appropriate answer in bi-lingal language by writing technical terminology in english only,
Draw simlifiedwel-label neat scheme,whenever necessary, which is easy to understand and recall and write the answer in bilingal language
only so that students should not face language problem to write the answer or they dont do chatting the answer or rattta-fication. Ans. should
be written brifely (Give stepwise marks)
Remark on
Answer in
Write Question first then , write the answer as per the note Hindi only to
Stepwise obtain full
Qus. No. given below marks mark
List Python features. िवशेषताएँ (Any four) W-22
2 अं क
Q.No.1  Easy to Learn and Use सीखने और उपयोग करने म आसान
 Interactive Mode इं टरै व मोड ( ेक 1/2
 Expressive Language भाषा अंक) कोई
 Interpreted Language भाषा चार
 Cross-platform Language
 Portable
 Free and Open Source
 Object-Oriented Language
 Extensible
 Large Standard Library
 GUI Programming Support
 Integrated
 Databases
 Scalable

Enlist applications for python programming.


Q.No.2
 Google's App Engine web development framework uses Python Any two W-23
as an application language. Google का App Engine वे ब डे वलपमट application,
framework एक ए केशन language के प म पायथन का use One
करता है । application
 Maya, a powerful integrated 3D modeling and animation system, for 1 M
provides a Python scripting API. each
 Linux Weekly News, published by using a web application
written in Python.
 Industrial Light and Magic, Pixar and others uses Python in the
production of animated movies.
 Desktop GUI Applications
 Image Processing Applications
 Scientific and Numeric Applications
 Audio and Video Based Applications
 3D CAD Applications

Describe indentation in Python. 2M for


Q.No.3 Indentation refers to the spaces at the beginning of a code line. W-22
defination
Indentation एक कोड लाइन की शु आत म spaces को refers करता
है ।Python indentation refers to adding white space before a statement to a
particular block of code. In another word, all the statements with the
same space to the right, belong to the same code block.

2M (1m
S-22
Name different modes of Python . each)
Q.No.4
Python has two basic modes:
पायथन के दो basic modes ह:
• Script (Normal Mode)
• Interactive Mode

How to give single and multiline comment in Python.


Single line comment: Single-line comments are created simply by
Q.No.5 2M (1m
beginning a line with the hash (#) character, and they are automatically S-22
terminated by the end of line. each
Example:
# print is a statement
print(‘Hello Python’)
Multi line comment: Python multi-line comment is a piece of text
enclosed in a delimiter (""") Triple quotation marks.
Example:
""" Multi-line comment used print("Python Comments") """
or
To add a multiline comment you could insert a # for each line:
Example:
#This is a comment
#written in
#more than just one line
print("Hello, World!")
Write a program to print following
1
Q.No.6
12 4M (for
123 correct S-22
1234 program
and logic)
for i in range(1,5):
for j in range(1,i+1):
print(j,end=' ')
print()

Explain building blocks of python Character set:


All characters that python can recognize. The below table illustrates the
Q.No.7 Python character set along with examples.

4M
S-22
For
explaining

Tokens: Tokens in python are building blocks of the Python


programming language. The role letters and words play for the English
language, Similar to role token play for a python programming language.
Python has the following tokens:
1)keywords
2)identifiers
3)literals
a)String literals
b)Numeric literals
c)Boolean Literals
d)Special literal None

You might also like