Python for Artificial Intelligence MNCST 319 KTU 2024 Scheme Minor Model Question Paper
MODEL QUESTION PAPER |
||||||
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY THIRD SEMESTER
B.TECH MINOR DEGREE EXAMINATION,MONTH AND YEAR |
||||||
CourseCode:MNCST319 |
||||||
Course Name: PYTHON FOR
ARTIFICIAL INTELLIGENCE |
||||||
Max.Marks:60 |
|
Duration: 2hours30minutes |
||||
|
|
|||||
|
PARTA |
|||||
|
|
Answerallquestions.Eachquestioncarries3marks |
CO |
Marks |
||
1 |
|
Explain the syntax of for loop to display the even numbers within the range 2 and 100 in reverse order. |
1 |
3 |
||
2 |
|
Write a Python script to find the factorial of a given number. |
1 |
3 |
||
3 |
|
Discuss the use of init method in a class with suitable examples. |
2 |
3 |
||
4 |
|
What is polymorphism? Give an example in the context of OOP in Python. |
2 |
3 |
||
5 |
|
Describe random number generation using Python. |
3 |
3 |
||
6 |
|
Write Python code to plot Sine wave. |
3 |
3 |
||
7 |
|
Show creation Of the Series object with suitable example. |
4 |
3 |
||
8 |
|
Discuss Simple Linear Regression model. |
4 |
3 |
||
PARTB |
||||||
Answer any one full question from
each module.Each question carries 9marks |
||||||
Module1 |
||||||
9 |
a) |
Discuss the relation between tuples,lists,and dictionaries in detail |
1 |
5 |
||
b) |
Write
a Python code to check whether a given year is a leap year or not[An year is
a leap year if it’s divisible by 4 but not divisible by 100 except for those
divisible by 400]. |
1 |
4 |
|||
10 |
a) |
Explain the use of Lambda function with suitable example. |
1 |
4 |
||
b) |
Write a Python program to read a list of numbers and sort the list in decreasing order without using any built in functions. Separate function should be written to sort the list where in the name of the list is passed as the parameter. |
1 |
5 |
|||
Module2 |
|||||||
11 |
a) |
Explain inheritance in Python.Give examples for each type of inheritance |
2 |
4 |
|||
|
b) |
Write a Python class named Circle constructed by a radius and two methods which will compute the area and the perimeter of a given circle. |
2 |
5 |
|||
12 |
a) |
How is exception handling accomplished in Python programs? |
2 |
4 |
|||
|
b) |
Write Python program to create a class called as Complex and implement add( ) method to add two complex numbers. Display the result by overloading the + Operator. |
2 |
5 |
|||
Module3 |
|||||||
13 |
a) |
Describe the slicing operation of NumPy Array. |
3 |
4 |
|||
b) |
Write a Python program to add two matrices and also find
the transpose of the resultant matrix. |
3 |
5 |
||||
14 |
a) |
Discuss the syntax for plotting scatter plot and pie chart |
3 |
4 |
|||
b) |
Writepythonprogramtosolvethefollowingsystemofequationsx1−2x2+9x3 +13x4=1 −5x1+x2+6x3−7x4=−34x1+8x2−4x3−2x4=−2 8x1 + 5x2 − 7x3 +
x4 = 5 |
3 |
5 |
||||
Module4 |
|||||||
15 |
a) |
Discuss the datapre-processing methods of Data frame for replacing Empty values and deleting the duplicate rows. |
4 |
4 |
|||
b) |
Given a file “auto.csv” of automobile data with the fields index, company, body-style, wheel- base, length, engine-type, num-of- cylinders, horsepower, average-mileage, and price, write Python codes using Pandas to · Load the data · Find the average mileage of all companies · Find the highest priced car of all companies. |
4 |
5 |
||||
16 |
a) |
Explain the basic steps in creating a model. |
4 |
4 |
|||
b) |
Write a Python code to predict value of y for x=6, using simple linear regression model trained using the following dataset. y 1.0 2.0 1.30 3.75 2.25 |
4 |
5 |
||||
***** |
Comments
Post a Comment