0% found this document useful (0 votes)
44 views2 pages

MCS 201

The document outlines the assignment details for the course MCS-201, focusing on Programming in C and Python, with a total of ten questions worth 100 marks. It includes specific tasks related to C programming and Python programming, such as algorithms, file handling, and creating modules. The assignment must be submitted by April 30, 2025, and adheres to guidelines provided in the Programme Guide.

Uploaded by

ak16426mfklb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views2 pages

MCS 201

The document outlines the assignment details for the course MCS-201, focusing on Programming in C and Python, with a total of ten questions worth 100 marks. It includes specific tasks related to C programming and Python programming, such as algorithms, file handling, and creating modules. The assignment must be submitted by April 30, 2025, and adheres to guidelines provided in the Programme Guide.

Uploaded by

ak16426mfklb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Course Code : MCS-201

Course Title : Programming in C and PYTHON


Assignment Number : BCA_NEWOL(II)-201/Assignment/2025
Maximum Marks : 100
Weightage : 30%
Last Date of Submission : 30thApril,2025(For January Session)

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 3: Write a C program to generate the following pattern: (8 Marks)


*
**
***
****
*****
Question 4: Write a C program to perform the following operation on matrices D = A * (B + C), where
A, B and C are matrices of (3 X 3) size and D is the resultant matrix. (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 6: (c) Write Python code to perform the following: (8 Marks)


(i) Copy content of file first.txt to second.txt
(ii) Reading a file
(iii) Writing into a file
(iv) Appending into a file

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)

Note: Slope of line segment = (y2 y1)/(x2 x1).

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

You might also like