0% found this document useful (0 votes)
10 views3 pages

Scripting Languages Exam Paper 2022

This document outlines the examination structure for a Scripting Languages course for Computer Science and Engineering/IT students, detailing the time, maximum marks, and instructions for answering questions. It includes a mix of objective and descriptive questions covering various programming concepts, such as Python features, data types, operators, loops, modules, file operations, and web frameworks. Students are required to attempt a total of six questions, with one compulsory objective question.

Uploaded by

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

Scripting Languages Exam Paper 2022

This document outlines the examination structure for a Scripting Languages course for Computer Science and Engineering/IT students, detailing the time, maximum marks, and instructions for answering questions. It includes a mix of objective and descriptive questions covering various programming concepts, such as Python features, data types, operators, loops, modules, file operations, and web frameworks. Students are required to attempt a total of six questions, with one compulsory objective question.

Uploaded by

Rajarshi Dhurwey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

st2025t7482 Total Pages : 3

Third Semester
Computer Science & Engineering/IT
Scheme OCBC July 2022
. SCRIPTINGLANGUAGES
Time: Three Hours Moximum Marks : 70
Note :I Attempttotalsirquestions. QuestionNo. (Objective type) is
1
compulsory. From the remaining questions attemp ffiryfve.
gd E: qar Ed fifrqr qaq iD-qi6 I (qrgfrE ,-mt-{ 6-r)
3{Frqtd tr q}q caif ii t A:-61 dE o} Ea fiftqr
i) In case of any doubt or di3pute, the English version question
should be treated as final.
ffi lft q-cFR & €tt ererqT frqtq fr fufr fr eiffi qrqr b
qaq @i Giftq qlil qrlmr

1. Choose the correct answer. 2 each


e8 sffr 6r qqq fifrqr
) Afunctionnamecannotstartwitha
(a) Alphabet (b) Underscore
(c) Number (d) Both (b) and (c)
rheerq fu fr gwnd b rner r-e E) e-cn-fr t
(er) [Link] (q) eis{eti
(v) rw< (q) (q) .*q (e) ++t
D Object are created using _ keyword.
qF+€ o\ b wst{r s\ ffirqT sldT t
(a) Create (b) Object
(c) New (d) None
0 For each loop is iterate over
(a) Number (b) Sting
(c) Anay (d) Function
s/2025t7482 PT.O.
L2l

E{ W & ws €Efe Ei-dr t


(ei) qrq{ (q) RT
(q) GTt (q) qrqqm

1v) A variable can have *--?


(a) Long descriptive names
O) Shortnames
(c) Both (a) and (b)
(d) None ofthe above
\'fr tfrf{d 6r qrq Cl [Link] tt
(ei) eir ffiq i=s
(e) end i=$
(r+) (GT) .fr-r fe) ++
(s) flt t oX re
v) are_for
Variables storing information.
(a) decimal (b) storage
(c) numbers (d) containers
aft&-d Eld t, {qRtqq d rdr q,-{i h frr-}
(si) SRra (q) r<)to
(r+) rq-d (q) didrr{

2. a) DefinehistoryandfeatureswithperVpython. 6
q-d qr q-{erq * qn-tro gq c.{tm oi qfulTkd fiftqt
b) Discuss on the variable and data type in detail. 6
nftnd-d efts sTdr ergq q{ ft-{f,rq t q-qf fi&rr

3. a) use.
Explain operators of different types we 6
h 3ilqtei{ "t} Oq wq}q o-{A t, s€ eq-$r$qr
3rf,rr qcFR
b) Write syntax of ifand else if with example. 6
if G etse ifil ftrytr sEt-{iq rrtrd ftft\l
. Si202517482 Contd.....
13l

4. a) [Link]. 6
W tfrgden o-d-qo\ python { eqwEql
b) Explain perVpython codes using flinctions in detail . 6
perl/python olEs d q;eam fr rrOrqor d [Link] t eqflrfll
5. a) Defineimportingownmoduleaswellasextemalmodulesindetail.
6

Eq)-eT 3{rq qild }' qre{-rriq q-dqfi-f, rip o\.ft-sf,R q


qfuiTR-d fiftqr

b) [Link]. 6
qzhuf{i o-t [Link] 6 Hrp-i sqT-6-iui q'ko r+qgrgqr

6. a) Explain read functions in detail. 6


Read ti;sarc o) 6suo t eqflr{qr
b) Discuss on file operations forprogramming. 6

dn.|fn a. ftii Hr{d eTqierT .r{ qqt fifrqr


7. a) Differentiate pattem matching and searching in detail. 6
H {ffi 3ft qtrT w frr<n t Gif,( qdEql
b) ExplainWeb2pywithexamples. 6
Web2Py d sqr{{or qE-o erflE\t ...

8. a) CompareDjangoandRubyonRailswithexample. 6
Django ett Ruby Grrl ie- qr sqiEqur uft-o gdrT fiftqr
b) Explain strutswith examples. 6
Struts o) s-qT6i"r l].FO qqgr{qr

-€r,GE+<e-

s12025t7482

Common questions

Powered by AI

Struts is an open-source framework used for developing Java EE web applications. It is based on the Model-View-Controller (MVC) architecture and provides a well-defined framework for managing and separating business logic, application flow, and presentation. Struts automate the creation of web applications using templates, reducing development time and increasing efficiency. Its significance lies in its robust set of tools and libraries for Java applications, offering a sophisticated handling of HTTP requests with greater maintainability and scalability compared to traditional Java web application methods .

Python was designed with the philosophy of code readability and simplicity, which is reflected in its use of English keywords instead of complex syntax. Python's easy-to-learn structure emphasizes readability and reduces the cost of program maintenance. It also supports modules and packages, which encourages modularity and code reuse .

Operators in Python, such as arithmetic, relational, logical, and assignment operators, perform various operations on variables and values. Arithmetic operators (e.g., +, -, *, /) perform mathematical calculations, while relational operators (e.g., ==, !=, >, <) compare values. Logical operators like 'and', 'or', 'not' allow for combining multiple conditions, and assignment operators (e.g., =, +=, -=) assign values to variables. For example, using 'x += 5' increments the variable x by 5 .

Read functions in Python, such as 'read()', 'readline()', and 'readlines()', are integral for file handling as they allow programs to access and manipulate data stored in files. 'read()' reads the entire file content, 'readline()' reads one line at a time, and 'readlines()' reads all lines and returns them as a list. These functions are critical for applications requiring data storage and retrieval, enabling efficient and systematic data management within programs .

In Python, variables act as placeholders for storing data, and their types determine the kinds of operations that can be performed on them. Python supports various data types, including integers, floats, strings, and lists, which allow it to handle different operations seamlessly. Variables do not require explicit declaration to reserve memory space, making Python flexible and efficient for developers to create robust applications .

In Python, the 'if' statement is used for decision-making operations. It executes a block of code if a specified condition is true. The syntax is: if condition: code_block. The 'else if', or 'elif' in Python, allows testing multiple expressions for truth and executing a block of code as soon as one condition is true. Its syntax is: elif condition: code_block. Example: if x > 0: print('Positive') elif x == 0: print('Zero') else: print('Negative').

Django and Ruby on Rails are popular web development frameworks known for their rapid development capabilities. Django, written in Python, emphasizes a clean, pragmatic design and comes with a range of built-in functionalities, aiding fast development. It is known for security, scalability, and versatility in deploying large-scale applications. In contrast, Ruby on Rails, based on Ruby, is appreciated for its focus on simplicity and convention over configuration, allowing developers to write less code and accomplish more in less time. Both frameworks facilitate clean and efficient coding but differ primarily in their respective programming language bases and built-in tools .

The 'continue' statement in Python is used inside loops to skip the current iteration and move to the next iteration of the loop. When 'continue' is encountered, the remaining code inside the loop for the current iteration is not executed, effectively controlling and modifying the loop flow. For instance, in a 'for' loop iterating over a range, 'if x % 2 == 0: continue' would skip even numbers, continuing with the next number in the range .

Importing modules and using external packages in Python greatly enhance functionality by providing additional tools and libraries that can be readily used. This promotes code reuse and easier maintenance. For example, the 'math' module can be imported to perform complex mathematical calculations like trigonometry and logarithms using functions such as math.sqrt(25). External packages like NumPy provide powerful capabilities for scientific computation and data analysis that are not available with the standard installation of Python .

Pattern matching in Python involves identifying sequences of characters shaped by patterns, typically using regular expressions (regex). Searching, on the other hand, finds specific sequences within text data. While searching focuses on finding exact matches, pattern matching uses patterns that allow flexibility, facilitating complex data manipulation and extraction tasks. These processes are vital in data validation and parsing tasks in programming and analysis .

You might also like