MCS 201
MCS 201
There are ten questions in this assignment which carries 80 marks. Each question carries 8 marks.
Rest 20 marks are for viva-voce. Answer all the questions from both the sections i.e. Section A and
Section B. You may use illustrations and diagrams to enhance the explanations. Include the screen
layouts also along with your assignment responses. Please go through the guidelines regarding
assignments given in the Programme Guide for the format of presentation.
SECTION-A (C-Programming)
Question1: Write an algorithm, draw a flow chart and write its corresponding C program to convert a
Binary decimal number to its equivalent Decimal number. (8 Marks)
Question2: Write an algorithm and use the concept of Structures to write the program in C, to generate
Progress-Report of students of a class X of the school for all its 4 terms (the class is of 20
students). Assumptions can be made wherever necessary. (8 Marks)
Question 5: Use the concept of File Handling, toWrite a program in C, to collect a list of N numbers in
a file, and separate the even and odd numbers from the given list of N numbers, and put
them in two separate files namely even_file and odd_file, respectively. (8 Marks)
SECTION-B (PYTHON-Programming)
Question 7: Write an algorithm to find the slope of a line segment whose end point coordinates
are(x1, y1) and (x2, y2). The algorithm gives output whether the slope is positive,
negative or zero. Transform your algorithm into Python program. (8 Marks)
12
Question 8: Write a programme in Python to create a package named Volume and create 3 module in it
named Cube, Cuboid and Sphere each having a function to calculate Volume of Cube,
Cuboid and Spherere spectively. Import the module in separate location and use the
functions. Assumptions can be made wherever necessary. Support your programme with
suitable comments to improve readability.
(8 Marks)
Question 9: Write a program in Python to perform following: (8 Marks)
To find square root of numbers in a list using lambda function.
To display first n lines from a file, where n is given by user.
To display size of a file in bytes
To display frequency of each word in a file.
Question 10: What are Co-routines? How Co-routines differ from threads? How Co-routines support
cooperative multi-tasking in python? Compare Subroutines and Co-routines
(8 Marks)
13