IGNOU MCS-201 solved assignment 2026-27

Published

Updated 1 October 2026 · Applies to the July 2026 and January 2027 sessions

IGNOU MCS-201 solved assignment 2026-27

Looking for the IGNOU MCS-201 solved assignment 2026-27? This page gives you the assignment details, the topic behind each of the 10 questions, and worked answers with code you can run. MCS-201 (Programming in C and Python) is a bridge course that MCA_NEW learners admitted under Category-2 study along with MCS-208.

All MCA assignments 2026-27

Note: the questions below are from IGNOU's published MCS-201 assignment booklet (2026). If your own booklet shows different questions, follow your booklet.

MCS-201 assignment details 2026-27

ItemDetails
CourseMCS-201 Programming in C and Python (bridge course)
Assignment no.PGDCA_NEW(I)/201/Assign/26, as printed in IGNOU's booklet. Bridge courses use the PGDCA number, so check your booklet.
Marks100 (80 written + 20 viva voce), weightage 30%
Questions10 questions of 8 marks each: 5 in Section A (C) and 5 in Section B (Python)
Last date, July 2026 session31 October 2026
Last date, January 2027 sessionSee your booklet (it was 30 April in the 2026 booklet)
SubmissionStudy Centre Coordinator; viva voce is compulsory

IGNOU asks you to use diagrams where helpful and to include screen layouts (output screenshots or printouts) with your answers.

Question-wise topics

QTopicWhat to show
1Decimal to binaryAlgorithm, flowchart and C program using repeated division by 2
2Student progress reportA struct with arrays for 20 students and 4 terms, totals, percentage and grade
3Number patternNested loops
4Matrix operation D = A + (B * C)Multiply B and C first, then add A
5File handlingSplit numbers into evenfile and oddfile with fopen, fprintf and fclose
6Leap year in PythonDivisible by 4 and not 100, or by 400
7Score to gradeInput validation and an if-elif ladder
8Package Area with 3 modules__init__.py, one module per shape, import from another folder
9Lambda and file operationsFour short programs
10Co-routinesTheory, comparisons and a short async example

Section A: C programming (worked answers)

Q1. Decimal to binary: algorithm, flowchart and C program (8 marks)

Algorithm

  1. Start.
  2. Read a decimal number N.
  3. Set i = 0.
  4. While N > 0: store N % 2 in bin[i], set N = N / 2, set i = i + 1.
  5. Print bin[i-1] down to bin[0].
  6. Stop.

Flowchart: draw it with standard symbols: Start (oval) → input N (parallelogram) → i = 0 (rectangle) → N > 0? (diamond). On Yes: bin[i] = N % 2, N = N / 2, i = i + 1, then loop back to the diamond. On No: print bin in reverse (parallelogram) → Stop (oval).

#include <stdio.h>

int main() {
    int n, i = 0, j, bin[32];

    printf("Enter a decimal number: ");
    scanf("%d", &n);

    if (n < 0) {
        printf("Please enter a non-negative number.\n");
        return 0;
    }
    if (n == 0) {
        printf("Binary: 0\n");
        return 0;
    }

    while (n > 0) {          /* repeated division by 2 */
        bin[i] = n % 2;      /* remainder is the next bit (from the right) */
        n = n / 2;
        i++;
    }

    printf("Binary: ");
    for (j = i - 1; j >= 0; j--)   /* print remainders in reverse order */
        printf("%d", bin[j]);
    printf("\n");
    return 0;
}

Sample run: input 13 gives 1101.

Q2. Progress report using structures (8 marks)

Algorithm: define a structure with roll number, name, marks for 4 terms × 5 subjects, term totals and percentage. For each of the 20 students, read the marks, add them term by term, and compute the percentage. Finally print one report line per student with a grade. Assumption: 5 subjects per term, each out of 100.

#include <stdio.h>
#define N 20        /* students in the section */
#define TERMS 4     /* four terms */
#define SUBJ 5      /* assumed number of subjects */

struct Student {
    int   roll;
    char  name[30];
    float marks[TERMS][SUBJ];   /* marks out of 100 */
    float termTotal[TERMS];
    float percent;
};

char gradeOf(float per) {
    if (per >= 90) return 'A';
    if (per >= 75) return 'B';
    if (per >= 60) return 'C';
    if (per >= 40) return 'D';
    return 'F';
}

int main() {
    struct Student s[N];
    int i, t, j;
    float grand;

    for (i = 0; i < N; i++) {
        printf("\nStudent %d - roll number: ", i + 1);
        scanf("%d", &s[i].roll);
        printf("Name: ");
        scanf(" %29[^\n]", s[i].name);
        grand = 0;
        for (t = 0; t < TERMS; t++) {
            s[i].termTotal[t] = 0;
            printf("Term %d - enter %d subject marks: ", t + 1, SUBJ);
            for (j = 0; j < SUBJ; j++) {
                scanf("%f", &s[i].marks[t][j]);
                s[i].termTotal[t] += s[i].marks[t][j];
            }
            grand += s[i].termTotal[t];
        }
        s[i].percent = grand / (TERMS * SUBJ);
    }

    printf("\n%-6s %-20s %7s %7s %7s %7s %8s %5s\n",
           "Roll", "Name", "T1", "T2", "T3", "T4", "Percent", "Grade");
    for (i = 0; i < N; i++) {
        printf("%-6d %-20s", s[i].roll, s[i].name);
        for (t = 0; t < TERMS; t++)
            printf(" %7.1f", s[i].termTotal[t]);
        printf(" %8.2f %5c\n", s[i].percent, gradeOf(s[i].percent));
    }
    return 0;
}

Q3. Number pattern (8 marks)

#include <stdio.h>

int main() {
    int i, j;
    for (i = 1; i <= 5; i++) {          /* i = row number */
        for (j = 1; j <= i; j++)        /* print 1..i in each row */
            printf("%d ", j);
        printf("\n");
    }
    return 0;
}

The outer loop controls the row. The inner loop prints the numbers 1 to the row number.

Q4. D = A + (B * C) for 3 × 3 matrices (8 marks)

#include <stdio.h>

int main() {
    int A[3][3], B[3][3], C[3][3], P[3][3], D[3][3];
    int i, j, k;

    printf("Enter matrix A (9 values): ");
    for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) scanf("%d", &A[i][j]);
    printf("Enter matrix B (9 values): ");
    for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) scanf("%d", &B[i][j]);
    printf("Enter matrix C (9 values): ");
    for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) scanf("%d", &C[i][j]);

    /* Step 1: P = B * C (matrix multiplication) */
    for (i = 0; i < 3; i++)
        for (j = 0; j < 3; j++) {
            P[i][j] = 0;
            for (k = 0; k < 3; k++)
                P[i][j] += B[i][k] * C[k][j];
        }

    /* Step 2: D = A + P (element-wise addition) */
    for (i = 0; i < 3; i++)
        for (j = 0; j < 3; j++)
            D[i][j] = A[i][j] + P[i][j];

    printf("Resultant matrix D:\n");
    for (i = 0; i < 3; i++) {
        for (j = 0; j < 3; j++) printf("%5d", D[i][j]);
        printf("\n");
    }
    return 0;
}

Remember the order of operations: the product B * C is calculated first.

Q5. Even and odd numbers into two files (8 marks)

#include <stdio.h>

int main() {
    FILE *fe, *fo;
    int n, x, i;

    fe = fopen("evenfile.txt", "w");
    fo = fopen("oddfile.txt", "w");
    if (fe == NULL || fo == NULL) {
        printf("Could not open the output files.\n");
        return 1;
    }

    printf("How many numbers? ");
    scanf("%d", &n);
    printf("Enter %d numbers: ", n);
    for (i = 0; i < n; i++) {
        scanf("%d", &x);
        if (x % 2 == 0)
            fprintf(fe, "%d\n", x);     /* even -> evenfile.txt */
        else
            fprintf(fo, "%d\n", x);     /* odd  -> oddfile.txt  */
    }

    fclose(fe);
    fclose(fo);
    printf("Done. See evenfile.txt and oddfile.txt\n");
    return 0;
}

Section B: Python programming (worked answers)

Q6. Leap year (8 marks)

# Program to check whether a year is a leap year
year = int(input("Enter a year: "))

# A year is a leap year if it is divisible by 4 but not by 100,
# or if it is divisible by 400.
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    print(year, "is a leap year")
else:
    print(year, "is not a leap year")

Test with 2024 (leap), 1900 (not leap) and 2000 (leap).

Q7. Score to grade (8 marks)

# Program to print a grade for a score between 0.0 and 1.0
try:
    score = float(input("Enter score (0.0 - 1.0): "))
except ValueError:
    print("Error: please enter a number")
else:
    if score < 0.0 or score > 1.0:
        print("Error: score must be between 0.0 and 1.0")
    elif score >= 0.9:
        print("Grade A")
    elif score >= 0.8:
        print("Grade B")
    elif score >= 0.7:
        print("Grade C")
    elif score >= 0.6:
        print("Grade D")
    else:
        print("Grade F")

Q8. Package Area with square, circle and rectangle modules (8 marks)

Create this folder structure:

project/
    Area/
        __init__.py      (can be empty)
        square.py
        circle.py
        rectangle.py
    app/
        main.py          (a different location)

square.py

def area(side):
    return side * side

circle.py

import math

def area(radius):
    return math.pi * radius * radius

rectangle.py

def area(length, breadth):
    return length * breadth

main.py, run from inside the app folder:

# main.py  (kept in a different folder from Area/)
import sys
sys.path.append("..")        # make the folder that contains Area/ importable

from Area import square, circle, rectangle

print("Square area    :", square.area(4))
print("Circle area    :", round(circle.area(3), 2))
print("Rectangle area :", rectangle.area(5, 2))

Q9. Lambda and file operations (8 marks)

Create a text file named sample.txt next to the script before you run it.

import os

# (a) Cube of numbers in a list using a lambda function
nums = [1, 2, 3, 4, 5]
cubes = list(map(lambda x: x ** 3, nums))
print("Cubes:", cubes)

filename = "sample.txt"

# (b) Frequency of each word in a file
freq = {}
with open(filename) as f:
    for word in f.read().lower().split():
        word = word.strip(".,;:!?\"'()")
        if word:
            freq[word] = freq.get(word, 0) + 1
for word, count in sorted(freq.items()):
    print(word, ":", count)

# (c) First n lines of a file (n given by the user)
n = int(input("How many lines to display? "))
with open(filename) as f:
    for i, line in enumerate(f):
        if i >= n:
            break
        print(line, end="")

# (d) Size of the file in bytes
print("\nSize of", filename, "=", os.path.getsize(filename), "bytes")

Q10. Co-routines (8 marks)

What they are: a co-routine is a function that can pause in the middle of its work and later resume from the same point, keeping its local state. In Python they are written with async def and paused with await (older code used generators with yield and send()).

Cooperative multitasking: several co-routines share one thread. Each runs until it reaches an await, then hands control back to the event loop, which runs another one. No co-routine is forced to stop, so they cooperate by yielding control voluntarily.

import asyncio

async def worker(name, delay):
    for i in range(3):
        print(name, "step", i)
        await asyncio.sleep(delay)      # hands control back to the event loop

async def main():
    await asyncio.gather(worker("A", 1), worker("B", 1.5))

asyncio.run(main())

Co-routines vs threads

PointCo-routinesThreads
SchedulingCooperative: switch only at awaitPre-emptive: the OS can switch at any time
CostVery light, thousands are practicalHeavier, each has its own stack
Data racesRare, since switches happen at known pointsCommon, so locks are needed
Best forWaiting on I/O (network, files)Blocking libraries and parallel work

Subroutine vs co-routine

PointSubroutine (normal function)Co-routine
Entry and exitOne entry, runs to the end, then returnsCan suspend and resume many times
StateLocal variables are lost after returnLocal state is kept between resumes
RelationshipCaller and callee (master and slave)Equals that pass control to each other

Submission and viva tips

  • Submit the assignment to the Coordinator of your Study Centre on or before the last date. Keep a photocopy and the receipt.
  • Write the final copy in your own words and your own handwriting where handwritten work is required. Use this page to understand the answer, not to copy it line by line.
  • Put your name, enrolment number, course code (MCS-201), assignment number and study centre code on the first page.
  • The viva voce is compulsory. IGNOU states that if you submit the assignment but do not attend the viva, the assignment is marked ZERO.
  • Practise explaining every program or answer aloud. The 20 viva marks are the easiest marks to lose.

Get the full solution

This page gives worked answers so you can understand each question. If you need help preparing the final copy of the MCS-201 assignment, ask us from the Contact page. Always compare the questions with your own booklet first.

Frequently asked questions

Who needs to submit the MCS-201 assignment?

MCA_NEW learners who were asked to take the bridge courses MCS-201 and MCS-208 at admission. Check your admission record to be sure.

How many marks does the MCS-201 assignment carry?

The assignment is out of 100: 80 for the ten written questions and 20 for the viva voce. It has a 30% weightage in the final result.

Do I need to run the programs?

Yes. IGNOU asks for screen layouts, so run each program and attach a screenshot or printout of the output.

What if my booklet has different questions?

Always answer the questions in your own booklet. Use these programs as models for similar questions.

Back to IGNOU MCA Solved Assignments 2026-27 (All Semesters).

etutor12 is an independent study blog and is not affiliated with IGNOU. Questions and dates are taken from IGNOU assignment booklets and public notices; always confirm them on ignou.ac.in and in your own booklet.