PYQ Sem 4
PYQ Sem 4
Registration No.:
|o&22oo
MST-1 (March-2023)
B. Tech (CSE) IV Semester
Subject Code: 21CS 2012 Duration: 90min
Subject Name: Python Programming Max. Marks: 50
PART A:(10*2)
PART B:(10*3)
PART A:(10*2)
PART B:(10*3)
S.No Question(s)( with Marks) Course Learning
Outcome
Write a program in Python to copy the content of one file to another CLO4
file without overwriting the existing file.
2 Write a program in Python to show the inbuilt functions and CLO3
methods available in Tuple.
3 Give ten operations that you can perfom on Lists. CLO3
4 Discuss various modes by which we can open a file. How will you CLO4
check the path given represents a file or adirectory?
Name:
Reg. No.:
Samanth
lo 32|12 oO4
8. What is the use of\ Backslash in python regular expression?
9. Define Dataframes.
10.List out three data structures in pandas.
END TERM EXAMINATION - MaylJune-2023 PART -B
SEMESTER -IV (16*5= 80 Marks)
(B.Tech-Computer Seience &Engineering)
11. a) Explain the working principle and the phases involved in
Subject Code: 21CS 2012 Duration: 3 hours
compilation with neat block diagram. (16 Marks)
Subject: Python Programming Max. Marks: 100 OR
b) A grocery shop decides to give its customers a discount of
Instructions
12.5% on the total purchases if it exceeds Rs. 1000. The
All Questions are compulsory quantity purchased & price per item is entered through the
The Question paper consists of 2 sections - Part A contains 10 keyboard. Write a program to calculate the final sales bill.
questions of 2 marks cach. Part B consists of5 questions of 16 (16 Marks)
Imarks each.
There is no overall choice. Only Part B question include
internal choicc. 12. a) i. Write a program to read a string containing binary digitsand
convert it intoits cquivalent decimal integral. (12 Marks)
PART -A
(2 * 10 = 20 Marks) ii. Discuss the type conversion methods. (04 Marks)
1, Define REPL. OR
2. State the output of following command. b) i. Write a program to calculate compound interest with class
>>>e-6j name Compound_Interest and execute for principal amount as
>>>print(type(c) Rs. 10,000 at rate of interest as 5% and number of years the
3. Convert the following while loop into for loop amount is deposited as 7 years. (10 Marks)
i=0 ii. Write and describe on methods to search a substring in a
s =0
given string with example. (06 Marks)
while i<= 50:
if (1%7 == 0) 13. a) i. Explain the List methods with suitable program. (10 Marks)
s=s+i
i=i+7 ii. Write a function histogram that takes string as
print(s) parameter
and generates a frequency of characters contained in it.
4. What is an index operator? How does it help in accessing (06 Marks)
characters?
5. How are elements of a list reversed? OR
6. What is the role of the * operator within the Zip() functions?
7. Describe pickling module.
b) Consider an ongoing test cricket series has Testl, Test2 &
Test3. Calculate the highest numbers of runs scored by an
individual cricketer in the test series. (16 Marks)
Note: Use Dictionary concept & Run time Input.
14. a) i. Write short notes on inbuilt functions to access file and
directories. (08 Marks)
ii. Write a function Find Largest() which acceptsa file name
as parameter and reports the longest line in the file.
(08 Marks)
OR
b) i. List out and describe the special characters that can be used
in Regular expressions. (06 Marks)
ii. Let assume an individual spends 'x amnount (in three
digits) On 'y' item each month. The amount spent each
month is stored in a file Expense.txt in the format MonthNo:
x\n. Create an application using file handling to calculate the
total amount spends on 'y' item in the last six months.
(10 Marks)
15. a) Build an image histogram viewer, implement a simple class
named ImageViewer and that class will contain helper methods
to:
i. Load Image. (03 Marks)
ii. Separate RGB channels from Image matrix. (03 Marks)
ii. Configure figure and axes (subplots). (03 Marks)
iv. Plot channel Histograms. (03 Marks)
v. Plot the image.
(03 Marks)
OR
b) i. Explain how to crcate custom subplot configuration on plots.
(08 Marks)
ii. Write a program to create bar charts and how to draw
errors
bars.
(08 Marks)
SRM UNIVERSITY DELHI-NCR, SONEPAT
Registration No.: Lo32 2 o 4
MST-1 (March-2023)
B.Tech (CSE)IV Semester
Subject Code: 21CS2006 Duration: 90 min
Max. Marks: 50
Subject Name: Operating System
Note: Question Paper consists of twO parts (Part-A and Part-B).
All Questions are compulsory in Part-A.
Answer any THREE Questions from Part-B
PARTA :( 10*2)
3 20 80
4 45 85
mn multabain
Jauo
au
Stnings
collitoin
nTav a
Constctin
SRM UNIVERSITY DELHI-NCR, SONEPAT
Registration No.:
MST-II(May-2023)
B.Tech (CSE)IV Semester
Duration: 90 min
Subject Code: 21CS2006
Max. Marks: 50
Subject Name: Operating System
(Part-A and Part-B).
Note: Question Paper consists of two parts
AllQuestions are compulsory in Part-A.
Answer any THREE Questions from Part-B
1. Define Scheduler? 3 2
3 5 5
2. Define time sharing system? 4
5
3. What is Bounded Waiting in Critical Section problem? 5 4
4. Define Dispatcher?
5. Define Real time OS? (i)If the CPU scheduling policy is priority non-preemptive,
6. Explain thesystem call used to create new processes? caleulate the average waiting time and average turnaround time.
7. What is the role of virtual memory? (Higher number represents higher priority) (8)
8. What is the need of page replacement algorithm in operating
system? (i)Ifthe CPUscheduling policy is priorIty preemptive, calculate
9. What do you mean by race condition among dependent the average waiting time and average turnaround time. (Higher
processes? number represents higher priority) (8)
10. Differentiate between Page and Segment?
OR
explain the workine
b) Draw the components of disk drive and
of each component. (8+8)
cxample :- (8+8)
14. a) Explain in detail with an
(i) Semaphores
(i)Address Binding
OR
methods for handling Deadlock?
by What are the four different
(4*4)
Context Switching with the help
15.a) (i) Explain the concept of
of diagram. (5)
between Long term Scheduler,
(ii) Give any three differences
and Short term Scheduler. (6)
Mediunn term Scheduler
between hard rcal time and soft
(iii)Give two points of differences
real time systens. (5)
OR
Registration No.: o 32 2 | 0 | o 4
MST-1(March-2023)
B. Tech (CSE)IVSemester
Subject Code: 21CS2010 Duration: 90 min
Subject Name: JAVAPROGRAMMING Max. Marks: 50
PART A:(10*2)
Course Learning
S.No Question(s) Outcome
State two features of java. CLO1
1 CLO1
Howare arrays different in Java?
CLO3
3 Describe the uses of this and super keywords with respect to
inheritarnce.
CLO2
What is polymorphism in Java and its types?
CLO1
Does Java work on WORA? Justify.
CLO1
6 What is garbage collection in java?
CLO2
What are restrictions of static methods?
CLO3
Describe the charAt and replace methods related to String
Define Abstraction.
CLO2
CLOI
10 What is the significance of Java Byte code
PART B:(10*3)
Course Learning
S.No Question(s) Outcome
number is palindrome or CLO3
Write a program to find out whether the given
not
programming? CLO1
2 What are constructors. What is its requirement in
Explain with the program (3+2+5) CLO3
in detail.
Discuss the differences between C and Java
the concept of method CLO2
4 What is Class and Object in Java? Explain
overriding with the help of program. (5+5)
SRM UNIVERSITY DELHI-NCR, SONEPAT
Registration No.:
MST II (May-2023)
B. Tech (CSE) IV Semester
Subject Code: 21CS2010 Duration: 90 min
Subject Name: JAVA PROGRAMMING Max. Marks: 50
PART A:(10*2)
S.No Question(s) Course Learning
Outcome
Distinguish between process and thread? CLO1
2 What are different methods of Graphics class. CLO4
3 Can we declare constructor in Interface? CLO2
4 What are different stages of applet. CLO4
Discuss two ways to implement multithreading in java. CLO3
6 What happens if we don't override run nethod in Java? CLO4
Do abstract class can have concrete methods? Justify the statement CLO1
8 What is diamond problem in Java? CLO3
Can Exception Handling can resolve Exception? Justify your statement CLO3
10 Write two differences between final and finally keyword. CLO2
PART B:(10*3)
S.No Question(s)( with Marks) Course Learning
Outcome
1 Explain the concept of synchronization of threads in java? Expiain with an CLO2
example program.
2 Differentiate between Checked and Unchecked exceptions? CLO3
3 Develop a java program for handling a button clicks? CLO4
4 What are various security issues of applet. Write shot note on Abstract CLO2
Class. (5+5)
Name:
Sanman+th.2 1 o o
Reg. No.:o32 ||
(ii) Differentiate between Java and C.
OR
(8)
b) Discuss the working of JVM in detail. What are the different types of
END TERM EXAMINATION - May-2023 operators present in java? Explain (8+8)
SEMESTER - IV
(B.Tech -CSE-AII Batches) 12.a) Discuss in detail how packages can be delined, creating, and
accessed. Explain the Usage of "Super" keyword, with an example
Subjcct Code:21CS2010 /CS2010 progran. (8+8)
Duration: 3 hours OR
Subject: Java Programming Max. Marks: 100 b) Explain the concept of dynamic binding in detail? What is constructor
Instructions
chaining? Explain with the help of progranm (8+8)
All Questions are compulsory 13.a) What is context switching? Describe the purpose and working of
The Question paper consists of 2 sections - Part A contains 10 sleep () method. (6+10)
questions of 2 marks cach. Part B consists of 5 questions of 16 OR
marks each. b) When should we use the printStackTrace ) method? What are the
Therc is no overall choice. Only Part B question include advantages of using exception handling in Java? (6+10)
internal choice.
PART-A 14. ayWhat is Applet? Write in detail about life cycle of an applct. Why
(2 * 10 = 20 Marks) Javaapplet no longer supported? (S+6+5)
PART -B
(16 * 5=80 Marks)
11. a)(i) Distinguish between procedure oriented and object-oriented
programming. (8)
SRM UNIVERSITY DELHI-NCR, SONEPAT
Registration No.:
MST-I(March-2023)
B. Tech (CSE) IV Semester
Subject Code: 21CS2004 Duration: 90 min
Subject Name: Theory of Computation Max. Marks: 50
A:(10*2)
PART
S.No Course
Learning
Outcome
1 Differentiate between DFA and NFA CLO1
2 Define [-transition and e-closure CLO1
CLO1
5 Design the FA for the set of strings L = (we {0, 1}*: w has odd parity}. A
binary string has odd parity iff the number of Is in it is odd
6 b (ab*ab*)* a b. CLO2
Show that the regular expressions are equivalent. and
b* a b* (ab*ab*).
7 What is the regular expression for the regular language represcnting the set CLO2
of languages fwE (a, b}*: w has both aa and bb as substrings} CLO2
Prove that regular languages are closed under difference.
CLO2
9 Specify the language L represcnting by the regular expression (1+01)*
CLO2
10 Simplify the regular expression (a U b)* (a Ue) b*
PART B:(10*3)
S.No
Course
Learning
Outcome
CLO1
11 Construct the minimized DFA for the given FA
1|Page
Let = (a, b}. Let M=
12 Construct the epsilon NFA and DFAfor the language that accepts set of CLO1
strings that have atmost three l'sover the Z ={0,1,2) *
13 Show that the following languages are not regular CLO2
(i) L={0|n is a power of2
(ii) L={a% w|w0 {a, b}*, Jw| =k}
(ii) TRAILING-COUNT ={any string s followed by a number of
a's equal to the length of s).
(iv) EVENPALINDROME ={ all words in PALINDROME that
have even length}
14 Using Arden's Theorem, find the regular expression corresponding to the CLO2
following FA:
b|a
DF A
2| Page
Name:
Page 1 of 2
OR
b)Define mealcy machine and moore machine. Discuss with example b Discuss in detail thc properties of fecursive and rccursively
the convcrsion of mealev machine to moore machine.[4+12 Marks] [8+8 Marks]
enumerable languages.
accepting L = wE
12.a) Construct a DFAand then regular grammar
number of b's is 3 mod
ia, b} I Wis a string over a } such that the
[16 Marks]
4}.
OR
b) Discuss in detail the closure properties of regular sets.
[16 Marks]
form gencrating
13.a) Construct the grammars in Chomsky normal [8+8 Marks]
the following:
2 I}.
{a""m # 1, m, n2 1). and (a'b" m, n
OR
Reduce the
b) Explain the procedure to convert CFG to GNF. j4+12 Marks)
following CFG to GNF.
A ’ B|S. B’ C
S ’ ASA |bA.
14. a) i) Construct a pda accepting the set of all even-length
palindromes over fa, b} by empty store. [8 Marks]
ii) Construct a pda Maccepting L= (a'b'c* |i=jorj=k} by final
state. [8 Marks]
OR
b) Construct a pda acepting {a"ba" | m, n >-1} by null store.
Construct the corresponding context-free grammar accepting the
same sct.
Page 2 of 2