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

MCS 201 8

Uploaded by

somesh rai
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)
35 views2 pages

MCS 201 8

Uploaded by

somesh rai
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 : PGDCA_NEW(I)/201/Assignment/2024
Maximum Marks : 100
Weightage : 30%
Last Date of Submission : 30thApril 2024 (for January Session)
31st October 2024 (for July Session)

There are eight questions in this assignment (four in each section i.e. Section A and Sec
tion B) which carries 80 marks. Each question carries 10 marks. Rest 20 marks are for
viva-voce. Answer all the questions from both the sections i.e. Section A and Section B. You
can use illustrations and diagrams to enhance the explanation. 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)

Q1: Briefly discuss the concept of “Call by value” and “Call by reference”. Give example
code in C for each. Support your code with suitable comments.

Q2: Briefly discuss the relation between Pointers and Arrays, giving suitable example. Write a
program in C, to print transpose of a 2D matrix entered by a user. Support your program
with suitable comments.

Q3: 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 to C program.
Note : Slope of line segment = (y2 – y1) / (x2 – x1)

Q4: Write an algorithm to find the HCF (Highest Common Factor) of the two
numbers entered by a user. Transform your algorithm to a C program, support
your program with suitable comments.

SECTION-B (PYTHON-Programming)

Q1: Discuss the connect( ) method of MySQL. Connector interface. List the arguments
involved with connect( ) method. Write Python code to create database student_DB
and to connect to student_DB (make suitable assumptions wherever necessary).

Q2: What are Pandas ? Write steps to import, read and print a CSV file using Pandas.
Also, transform your steps in to suitable code in Python.

Q3: Write steps to create a package. Apply these steps to create a package named volume and
create 3 modules in it named cube, cuboid and sphere, having function to calculate
volume of the cube, cuboid and sphere respectively. Import the modules defined in the
package and use the defined functions for calculation of volume respectively.

3
Q4: What does map( ) function do ? Write a program in Python to print the cube of the
numbers present in the list, by using map( ) function.

You might also like