You are on page 1of 3

Set 1

Answer any Three out of Four


1. Write a Script to Read the File Name from the End User and Remove Blank Lines Present in that File
2. Write a Script that Reads 2 Integer Numbers and perform the required Mathematical operation based on
provided Option using case.
1 Addition Operation
2 Subtraction Operation
3 Multiplication Operation
4 Division Operation
3. Write a Script that Reads a String as Input and perform the Reverse of a given String
4. Write a Script for accessing Array Elements by using for Loop if Indices are Random

Set2
Answer any Three out of Four
1. Write a Script to Read the File Name from the End User and Remove Duplicate Lines Present in that File
2. Write a script to read a number from 0 to 9 and print an equivalent English word using case.
3. Write a Script to Display all Employees Information where Salary is Greater than 2500
emp.txt:
100:James:1000:Hyderabad
200:Williams:2000:Chennai
300:Robins:3000:Hyderabad
400:Adams:4000:Delhi
500:Martin:5000:Hyderabad
5. Write a Function to generate Prime Numbers which are Less than OR Equal to given Number

Set 3
Answer any Three out of Four
1. Write a Script for floating Point Arithmetic operations.
2. Write a Script that Accepts a Single Character and Checks whether it is Digit OR Special Character OR
Vowel OR Consonant using case.
3. Write a Script to Create an Array with some Elements and Print all Elements by using while Loop, for Loop
and advanced for Loop.
4. Secret Agent Application:
Rules:
1) The first character of the Name should be 'd'
2) The Last character of Favorite Actor should be 'r'
3) The Lucky Number should be 7
4) The number of characters in his favorite dish should be >=6.
If the above conditions are satisfied then user is valid secret agent and share information about our next operation,
otherwise just send thanks message.
Set 4
Answer any Three out of Four
1. Write a Script to Read 4 Digit Integer Number and Print the Sum of Digits Present in that Number
2. Script to Test whether the given File Exists OR not
3. Write a Script to Save all Employees Information where Salary is Greater than 2500 and City is Hyderabad to
hyd.txt
emp.txt:
100:James:1000:Hyderabad
200:Williams:2000:Chennai
300:Robins:3000:Hyderabad
400:Adams:4000:Delhi
500:Martin:5000:Hyderabad
4. Write a Script to append Multiple Files Content to a Single File result.txt. File Names are passed as Command
Line Arguments

Set 5
Answer any Three out of Four
1. Write a Script to Read Employee Monthly Salary and Print his Bonus. The Bonus should be 25% of Annual
Salary
2. Write a Script that Accepts a Single Character and Check whether the given Character is Alphabet OR Digit
OR Special Character using case
3. Write a Script to Store given n Numbers into an Array
4. Write a Script to generate Hotel Bill based on Customer selected Items. The Items and Price Information is as
follows
A Vadapov (Each Plate Rs 30 /-)
B Dosa (Each Plate Rs 50 /-)
C Poori (Each Plate Rs 40 /-)
D Idli (Each Plate Rs 25 /-)

Set 6
Answer any Three out of Four
1. Write a script to perform Mathematical Operations using expr, let, (( )), and [ ]
2. Script to Test whether the given File is Regular File OR Directory
3. Write a Script to Read Employee Data and Insert into emp.txt File
4. Write a Function to generate 1st n Prime Numbers
Set 7
Answer any Three out of Four
1. Write a Script that Reads an Integer Number and Checks whether it is 3 Digit Number OR not
2. Demonstrate how to remove Array Elements.
3. Write a Script to Read n Numbers and Store inside Array. Print the Sum of Even Numbers and Odd Numbers
separately
4. Write a Script that performs File Operations based on provided Option
A Display Content
B Append Content
C Overwrite Content
D Delete Content
The file name is abc.txt

Set 8
Answer any Three out of Four
1. Write a Script to Read File Name from the End User and verify whether it exists or not and display its
Content on the Terminal if it exists
2. Write a Script that Display Numbers from 1 to 100, which are divisible by 10.
3. Create an array and demonstrate how to access the elements of an array
4. Book Rental Application:
The snist Book Company needs a way to determine the cost that a student has to pay for renting a Book.
The cost is dependent on the time of the Book is returned.
However there are also special rates on Saturday and Sundays.
The Fee Structure is shown in the following list:
The cost is Rs 30 /- Per Day.
If the Book is returned after 9 PM,the student will be charged an extra day.
If the Book is rented on a Sunday, the student will get 50% off for as long as they keep the book.
If the Book is rented on a Saturday, the student will get 30% off as long as they keep the book.
We need to write the code to meet this requiement

You might also like