0% found this document useful (0 votes)
10 views

Assignment Questions

digital

Uploaded by

Anusha Sagi
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)
10 views

Assignment Questions

digital

Uploaded by

Anusha Sagi
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/ 2

Input file

Student Mobile
S.no Name ID Status student mail number
1 Anil sumedha_pd PASS [email protected] 9898989989
2 Rajitha sumedha_PD PASS [email protected] 7870889900
3 Ahmed sumedha_pd PASS [email protected] 6576565786
4 Kevin sumedha_dv FAIL [email protected] 9809898809
5 Paul sumedha_dv PASS [email protected] 9009999988
6 Kinnera SUMEDHA_pd FAIL [email protected] 909997767
[email protected]
7 santosh sumedha_cl PASS m 34343343445
8 Raavi sumedha_cl PASS [email protected] 9879890898
9 Abhi SUMEDHA_cl FAIL [email protected] 33232323232

From the above input file data write the script / command for the
following questions

1. To find all entries for students who passed the exam


2. To extract and display all student names
3. To print the mobile number of a specific student (example hari)
4. To print the pass/fail status of a specific student (example hari)
5.To filter and output all entries with a pass status in the input3 file.
6.To calculate and display the total number of students who passed the exam
7.To find and print the student ID of all students who passed the exam.
8.To replace the pass/fail status of all students with "passing" and "failing"
respectively
9.To change the domain of all student emails from "yahoo.com" & “gmail.com”
to "sumedhait.edu" and all other mail names into sumedhait.edu.

2. Table.txt
brown bread mat hair 42
blue cake mug shirt -7
yellow banana window shoes 3.14
Use above data and answer the following questions.
1. calculate and display the product of numbers in the last field of each line. Consider
space as the field separator for this file.
2. Append .(dot) to all the input lines for the given stdin data.
3. Consider the following file scores.csv
Name,Maths,Physics,Chemistry
Blue,67,46,99
Lin,78,83,80
Er,56,79,92
Cy,97,98,95
Ort,68,72,66
Ith,100,100,100

1. For the input file scores.csv, extract Name and Physics fields in the
format shown below.
2. Display names of those who've scored above 70 in Maths.

You might also like