Quiz Space

System Commands OPPE 2: May 2023, Set 1 (May 2023 term)

Question 1

+15 marksProgramming

Gaurav is a software developer who works on a project in which he uses python as programming language. He puts as comment # TODO: <things he wants to do later> to the things he wants to do later in the code base. One day, he wants to complete all those things, for that, he wants to get all the todo tasks. He wants to write a SED script to search for the todo comments and extract only the <things he wants to do later> part.

Write the SED script for the above task.

Sample Input

...
        if self.propagate_exceptions:
            # if we want to repropagate the exception, we can attempt to
            # raise it with the whole traceback in case we can do that
            # (the function was actually called from the except part)
            # otherwise, we just raise the error again
            if exc_value is e:
                reraise(exc_type, exc_value, tb)
            else:
                raise e

        self.log_exception((exc_type, exc_value, tb))
        server_error = InternalServerError()
        # TODO: pass as param when Werkzeug>=1.0.0 is required
        # TODO: also remove note about this from docstring and docs
        server_error.original_exception = e
        handler = self._find_error_handler(server_error)

        if handler is not None:
            server_error = handler(server_error)
...

Sample Output

pass as param when Werkzeug>=1.0.0 is required
also remove note about this from docstring and docs

Question 2

+15 marksProgramming

Raj is a lazy student, he is in his bachelor's degree program. He has decided to apply for a masters in data science program in various universities, so he wrote a general letter template and populated the respective values such as university name, experience and current position.

Write a script to achieve the same and get the university name, experience, and current_position from the standard input respectively and print the populated text.

Template: template.txt

Dear Members of the Admission Committee,

I am writing to apply for the Master's in Data Science program at [University Name]. With a strong background in data analysis and a passion for innovation, I am eager to join your esteemed institution to further refine my skills and contribute to the field.

Through [mention years] of experience in [Your Current or Previous Position], I've gained proficiency in programming, statistics, and data visualization. I am drawn to [University Name] for its reputation, cutting-edge research, and interdisciplinary approach, which align perfectly with my aspirations.

I am excited about the prospect of learning from [University Name]'s distinguished faculty and collaborating with fellow students who share my enthusiasm. Enclosed is my resume for your consideration.

Thank you for the opportunity to apply. I look forward to the chance of joining the Master's in Data Science program at [University Name].

Sincerely,
Raj

Question 3

+15 marksProgramming

Write an AWK script to provide the serial number, result, and total for the data on the student marks.

Note: The output should be tab separated values. A student passes (RESULT is PASS) when the score in every subject is at least 40, otherwise the result is FAIL. TOTAL is the sum of the five scores.

Sample Input

L1,L2,MATHS,SCIENCE,SOCIAL
86,92,78,90,85
70,80,95,88,92
92,88,35,82,78
65,20,20,85,90
88,90,92,78,85

Sample Output

SNO L1 L2 MATHS SCIENCE SOCIAL RESULT TOTAL
1 86 92 78 90 85 PASS 431
2 70 80 95 88 92 PASS 425
3 92 88 35 82 78 FAIL 375
4 65 20 20 85 90 FAIL 280
5 88 90 92 78 85 PASS 433

3 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the System Commands OPPE 2 May 2023 Set 1 paper

The IIT Madras BS System Commands (System Commands) OPPE 2 paper sat on May 2023, in the May 2023 term, set 1: 6 questions for 100 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureSystem Commands OPPE 2 May 2023 Set 1 at a glance
TermMay 2023 term
SubjectSystem Commands
Course codeBSSE2001
Questions6
Marks100
Duration180 min
Programming6
Official paperOPPE 2, May 2023 Set 1
Negative markingNo negative marking.
Updated

Other sets that day

More System Commands