You are on page 1of 19

Course Name –

PYTHON
FOR
MACHINE LEARNING

Course Code –
INT 215

Continuous Assessment - I

Page 1
IMPORTANT GUIDELINES:
1. All questions in this Academic Task are compulsory.

2. It is mandatory to attempt all questions of the assignment in your own


handwriting on A4 size sheets/pages with a blue colour ink pen. Any other
mode of attempt (typed or printed codes or table) except
handwritten/drawn will not be accepted/considered as valid submission(s)
under any circumstances.

3. Every attempted sheet/page should carry clear details of student such as


Name, Registration number, Roll number, Question number and Page
number. The page numbers should be written clearly on the bottom of
every attempted sheet in a prescribed format as: for page 1; Page 1 of 4, for
page 2; Page 2 of 4, for page 3; Page 3 of 4 and for page 4; Page 4 of 4, in
case your assignment/document is of 4 pages.

4. After attempting the answer(s) single pdf format document (can be done
with many free online available converters).

5. This PDF file should be uploaded onto the UMS interface on or before the
last date of the submission.

6. Refrain from indulging into plagiarism as copy cases will be marked zero.

7. This Document contains multiple sets of papers. The allocation sheet is


also attached in the CA file. All the students are advised to attempt the Set
allocated to him/her.

8. If any student found indulge in malpractices like plagiarism from internet


or classmates, attempting wrong set of question paper or any other, will be
awarded with zero (0) marks in CA.

Page 2
PYTHON FOR MACHINE LEARNING (INT-215)

CA-1
Set-1

1. You are running a small convenience store and want to keep track of your inventory. Can you
write a program that allows you to add and remove items from your inventory, and displays the
current stock?

2. You have a group of friends coming over for a game night, and you want to make sure there are
enough snacks for everyone. Can you write a program that takes in the number of people
coming and recommends how many bags of chips and bottles of soda you should buy?

3. You are a teacher and want to grade your students' exams. Can you write a program that takes in
a list of scores and calculates the average, minimum, and maximum grades?

4. You have a collection of favorite recipes, but sometimes forget which ingredients you have in
stock. Can you write a program that allows you to search your recipes and check off the
ingredients you have, and then suggests which recipe to make based on what you already
have?(eg. output)
5.
You work at a zoo and need to keep track of the animals' feeding schedules. Can you write a
program that allows you to add and remove feedings, and displays the next feeding time for
each animal?

Page 3
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-2

1. You are planning a road trip and want to calculate the total distance and estimated travel time.
Can you write a program that takes in the starting and ending locations and calculates the
distance and time based on a predetermined rate?

2. You work for a charity that wants to send thank-you notes to all their donors. Can you write a
program that takes in a list of donor names and generates a personalized email for each one?

3. You are a personal trainer and want to track your clients' progress. Can you write a program that
takes in a list of their measurements and calculates their body mass index (BMI)?

4. You are planning a party and want to make sure everyone has a good time. Can you write a
program that takes in the number of guests and generates a random party game or activity for
them to play?

5. You are a cashier at a grocery store and want to make sure that the customers receive the
correct change. Write a program that takes in the cost of the items and the amount of money
paid by the customer, and calculates and prints the change.

Page 4
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-3

1. You are given a text file containing a list of words. Can you write a program that will read in the
file and count the number of occurrences of each word?

2. Your boss has tasked you with developing a program to calculate the area of different shapes.
Can you write functions to calculate the area of a square, rectangle, and triangle, all in one
program? The program should prompt the user for the type of shape (square, rectangle, or
triangle) and the necessary dimensions. It should then calculate the area and print the result.

3. You have been hired by a local bank to develop a program that will calculate compound interest.
Can you write a function that takes in the principal, interest rate, and time period, and returns
the compound interest? The program should take in the principal, interest rate, and time period,
and calculate the compound interest. It should then print the result.

4. You are tasked with creating a program to simulate a lottery. Can you write a function that
generates 5 random numbers between 1 and 50, and then checks them against a user's ticket?
The program should generate 5 random numbers between 1 and 50, and then prompt the user
to input their 5 chosen numbers. The program should then compare the user's numbers to the
generated numbers and print the number of matches.

5. You have been hired by a car rental company to develop a program to calculate the cost of
renting a car. Can you write a program that takes in the rental period and the type of car, and
returns the total cost? Set the per day cost of each car yourself.

Page 5
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-4

1. You are tasked with developing a program that will calculate the Fibonacci sequence. Can you
write a function that takes in a number n, and returns the first n numbers in the sequence?

2. You are tasked with developing a program that will calculate the distance between two points on
a 2D plane. Can you write a function that takes in the x and y coordinates of two points, and
returns the distance between them?

3. You have been hired by a restaurant to develop a program to keep track of their menu. Can you
write a program that allows the user to add, edit, and delete items on the menu?

4. Your task is to create a program that generates a word cloud from a text file. Can you write a
program that reads in the file, removes common stop words, and then generates a word cloud
using the most frequently occurring words?

5. You have been hired by a sports team to develop a program to keep track of their scores. Can
you write a program that takes in the team names and scores, and then displays the current
rankings?

Page 6
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-5

1. You are given a list of numbers. Can you write a program that finds the average of the numbers,
as well as the highest and lowest numbers in the list?

2. You have been hired by a company to develop a program that will calculate the area of a circle.
Can you write a function that takes in the radius of a circle and returns the area? (eg. output)

3. Your task is to create a program that converts temperatures between Fahrenheit and Celsius.
Can you write a function that takes in a temperature and the units it is in, and then returns the
equivalent temperature in the other unit?

4. You are given a text file containing a list of names. Can you write a program that reads in the file
and sorts the names alphabetically?

5. You have been hired by a company to develop a program that will generate a random quote. Can
you write a function that selects a quote from a list of quotes, and then displays it to the user?

Page 7
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-6

1. Your task is to develop a program that can solve a quadratic equation. Can you write a function
that takes in the coefficients of the equation, and returns the roots (if they exist)?

2. You have been hired by a company to develop a program that can convert between different
units of measurement. Can you write a function that takes in a measurement in one unit, and
returns the equivalent measurement in another unit?

3. You are given a list of numbers. Can you write a program that calculates the mean, median, and
mode of the list? (atleast 2 different solutions/codes/ways)

4. You have been hired by a company to develop a program that can encode and decode messages
using the Caesar cipher. Can you write a program that takes in a message and a shift value, and
returns the encoded or decoded message?

5. You are given a list of strings. Can you write a program that finds the longest and shortest string
in the list?

Page 8
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-7

1. Your task is to develop a program that can check if a given number is prime. Can you write a
function that takes in a number, and returns True if it is prime, and False otherwise? (atleast 2
different ways/codes/solutions)

2. You've been hired by a store to create a program that calculates discounts on purchases. Can you
write a function that takes in the price of an item and the discount percentage, and returns the
discounted price?

3. You're tasked with creating a program that will convert currency from one type to another. Can
you write a function that takes in the amount and currency type, and returns the equivalent
amount in the desired currency?

4. You've been hired by a company to create a program that can calculate the tip on a restaurant
bill. Can you write a function that takes in the bill amount and percentage to tip, and returns the
total bill with tip included?

5. You've been hired by a school to create a program that can calculate final grades for students
based on their scores on different assignments. Can you write a function that takes in a list of
assignment scores and weights, and returns the final grade for the student?

Page 9
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-8

1. You've been hired by a company to create a program that can search for a specific string of text in a
file. Can you write a function that takes in a filename and the search string, and returns the line(s) in
the file that contain the search string?

2. You've been hired by a company to create a program that can check if a given email address is valid
or not. Can you write a function that takes in an email address and returns True if it's valid, and False
if it's not?

3. You are a farmer who wants to calculate the cost of planting crops in your field. Write a program that
takes in the cost of seed, fertilizer, and labor, as well as the size of your field, and calculates the total
cost of planting.

4. You work at a zoo and need to keep track of the number of animals in each exhibit. Write a program
that allows you to add or remove animals, and displays the current count for each exhibit.

5. You are a student who wants to calculate your grade for a course. Write a program that takes in your
scores for homework, exams, and projects, and calculates your overall grade.

Page 10
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-9

1. You are a chef who wants to create a recipe book. Write a program that allows you to add or
remove recipes, and displays the current list of recipes.

2. You are a store manager who wants to keep track of your inventory. Write a program that allows
you to add or remove items from your inventory, and displays the current count for each item.

3. You are a salesperson who wants to keep track of your sales. Write a program that allows you to
enter the amount of each sale, and calculates your total sales for the week.

4. You are a librarian who wants to keep track of your books. Write a program that allows you to
add or remove books from your collection, and displays the current list of books.

5. You are a student who wants to create flashcards to help you study for a test. Write a program
that allows you to create and save flashcards, and quiz yourself using the flashcards.

Page 11
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-10

1. You are a gamer who wants to keep track of your high scores. Write a program that allows you to
add or remove high scores, and displays the current list of high scores.

2. You are a teacher who wants to calculate the average grade for your class. Write a program that
takes in the grades for each student, and calculates the overall average.

3. You are a pet owner who wants to keep track of your pet's medical history. Write a program that
allows you to add or remove medical records, and displays the current medical history.

4. You are a musician who wants to keep track of your practice sessions. Write a program that
allows you to log each practice session, and displays the total time practiced.

5. You are a soccer coach who wants to keep track of your team's performance. Write a program
that allows you to log each game's results, and displays the team's overall record.

Page 12
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-11

1. You are tasked with creating a program that will help a restaurant keep track of their
reservations. Can you write a function that takes in the date and time of the reservation, and
then adds it to the reservation book?

2. You are tasked with creating a program that will help a teacher manage their students' grades.
Can you write a function that takes in the student's name and their grades for each subject, and
then calculates their average grade?

3. You have been hired by a fitness studio to develop a program that will help clients track their
progress. Can you write a function that takes in the client's weight and height, and then
calculates their body mass index (BMI)?

4. You are tasked with developing a program that will help a charity keep track of their donations.
Can you write a function that takes in the donor's name and the amount of the donation, and
then adds it to the list of donations?

5. You have been hired by a school to develop a program that will help teachers assign homework
to students. Can you write a function that takes in the student's name and the assignment, and
then adds it to the student's homework list?

Page 13
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-12

1. You are a car enthusiast who wants to keep track of your car collection. Write a program that
allows you to add or remove cars from your collection, and displays the current list of cars.

2. You are a gym-goer who wants to track your progress in lifting weights. Write a program that
allows you to record the weight lifted and number of sets for each exercise, and displays your
progress over time.

3. You are a movie buff who wants to create a list of must-watch movies. Write a program that
allows you to add or remove movies from your list, and displays the current list of movies.

4. You work for a library and are tasked with developing a program to keep track of book loans.
Write a program that takes in the book title and borrower name, and stores it in a database.

5. You are tasked with developing a program that will generate a random password for a user. Can
you write a function that takes in the user's name and age, and then creates a password using a
combination of their name, age, and a randomly generated string?

Page 14
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-13

1. You are working for a bank that wants to develop a program that will allow customers to check
their account balance. Can you write a program that takes in the customer's account number
and password, and then displays their account balance?

2. You are working for a company that wants to develop a program that will allow employees to log
their working hours. Can you write a program that takes in the employee's name and the
number of hours worked, and then displays the total number of hours worked for the week?

3. Can you write a program that takes in a list of numbers and determines if they are in ascending
or descending order?

4. Can you write a program that reads in a text file and replaces every occurrence of a word with a
different word?

5. Your task is to create a program that calculates the factorial of a number. Can you write a
function that takes in a number and returns its factorial and sum of its digits?

Page 15
PYTHON FOR MACHINE LEARNING (INT-215)
CA-1
Set-14

1. You are building a movie recommendation engine that helps users discover movies based on
their preferences. The engine should prompt the user to choose a movie genre, and based on
their selection, recommend movies that fit within that genre. Write a Python program that
prompts the user to select a genre from the following options: Action, Comedy, Drama, or
Romance. Based on the user's choice, the program should recommend a list of movies within
that genre.
For example, if the user selects "Drama," the program should recommend movies such as "The
Godfather," "Forrest Gump," "Schindler's List," and "The Shawshank Redemption." The program
should provide a list of at least 4 movie recommendations for each genre.

2. You are building a program that helps users learn a new language by generating personalized
vocabulary quizzes. Write a function that takes a list of words and their translations, and
generates a quiz with multiple choice questions.

3. You are working for a coffee shop that wants to develop a program that will allow customers to
place their orders online. Can you write a program that takes in the customer's name, the type of
coffee, and the quantity, and then displays the total cost of the order?

4. You have been hired by a movie theater to develop a program that will calculate the cost of a
movie ticket. Can you write a function that takes in the movie name, the number of tickets, and
the time of day, and then calculates the cost of the tickets?

5. You are tasked with developing a program that will help a museum keep track of their exhibits.
Can you write a function that takes in the exhibit name and the date it will be on display, and
then adds it to the museum's exhibit list?

Page 16
ROLL NO. WISE QUESTION SET ALLOCATION

Serial No. Registration Number Name RollNumber Set No.

1 12109704 Kella Uday Kumar RK21CHA01 Set-1

2 12111698 Shloka singh RK21CHA02 Set-2

3 12111997 Pogula Mythri RK21CHA03 Set-3

4 12106169 L Mohammed Zeeshan RK21CHA04 Set-4

5 12104929 Siruvuri Gnana Siddhik Varma RK21CHA05 Set-5

6 12104957 Akshat Kumawat RK21CHA06 Set-6

7 12105279 Gangulakurthi Hari Charan RK21CHA07 Set-7

8 12105447 Veeramachaneni Sandeep RK21CHA08 Set-8

9 12104815 Gona Tony Satya Rohith RK21CHA09 Set-9

10 12104843 Naga Venkata Yaswanth Lankadasu RK21CHA10 Set-10

11 12104863 Surampalli Varun Kumar RK21CHA11 Set-11

12 12104651 Jayant Bhardwaj RK21CHA12 Set-12

13 12104500 Challa Tejan Sree Chowdary RK21CHA13 Set-13

14 12103675 Dilpreet Singh Bhogal RK21CHA14 Set-14

15 12103426 Pinjari Abdhulla RK21CHA15 Set-1

16 12102800 Pesarlanka Devendra Babu RK21CHA16 Set-2

17 12102610 S Surjith Subash RK21CHA17 Set-3

18 12100315 Monish V RK21CHA18 Set-4

19 12101119 Vaibhav Kohli RK21CHA19 Set-5

20 12100870 Kandula Chiru Hans Raj RK21CHA20 Set-6

21 12101377 Nikhil Mahana RK21CHA21 Set-7

Page 17
22 12102758 Pogaku Ravi Narasimha RK21CHA22 Set-8

23 12104670 Suraj KM RK21CHA23 Set-9

24 12105715 Aluru Srinivas Kasyap Kumar RK21CHA24 Set-10

25 12103359 Pappu Mouli RK21CHA25 Set-11

26 12100751 Mahendra Reddy K RK21CHA26 Set-12

27 12102603 Madala Venkatesh RK21CHA27 Set-13

28 12104916 Rishabh Jain RK21CHA28 Set-14

29 12106118 Beedupalli Pavan Sai Royal RK21CHA29 Set-1

30 12110449 Hritik Khandelwal RK21CHA30 Set-2

31 12106222 Komal Pasumarthy RK21CHA31 Set-3

32 12101871 Varadarajulu Koushik Sai RK21CHA32 Set-4

33 12103182 Vannala Rajesh RK21CHA33 Set-5

34 12104536 Jagadesh S R RK21CHA34 Set-6

35 12101448 Tanu Verma RK21CHB35 Set-7

36 12100859 Abhinav Kumar RK21CHB37 Set-8

37 12100403 Poothi Chandrasekhar Reddy RK21CHB38 Set-9

38 12102487 Madannagari Lokesh Simha RK21CHB39 Set-10

39 12102585 Nikhil Pathak RK21CHB40 Set-11

40 12103366 Kuruba Maheswaarr RK21CHB41 Set-12

41 12103535 Kusumanchi Vinay RK21CHB42 Set-13

42 12103080 R Akhil Reddy RK21CHB43 Set-14

43 12104566 Garine Surya Teja RK21CHB44 Set-1

44 12104855 Satti Satya Reddy RK21CHB45 Set-2

45 12104884 Arjun dev R RK21CHB46 Set-3

Page 18
46 12104835 Pentakota Srinu RK21CHB47 Set-4

47 12104692 Tsaliki Mokshajna Nagendra RK21CHB48 Set-5

48 12105562 Abhishek Kumar RK21CHB49 Set-6

49 12105702 Gaurav Kumar RK21CHB50 Set-7

50 12105868 Akleema Fatima RK21CHB51 Set-8

51 12105093 Rambai Purandhar Srikanth RK21CHB52 Set-9

52 12106749 Jundeep Sharma RK21CHB53 Set-10

53 12109507 Policherla Mohith Sreenivas RK21CHB54 Set-11

54 12104702 K Somanath Sai Teja Srinivas RK21CHB55 Set-12

55 12103929 Velagalapalli Sai Kishore Chandra RK21CHB56 Set-13

56 12110942 Yanamaddi Vamshi RK21CHB57 Set-14

57 12112233 Ankit Yadav RK21CHB58 Set-1

58 12101012 Ayyala Tony Michael RK21CHB59 Set-2

59 12112945 Gangeddula Goutham Reddy RK21CHB60 Set-3

60 12104518 Yalavarthi Vignesh RK21CHB61 Set-4

61 12104847 Iskala Santhosh Kumar RK21CHB62 Set-5

62 12104464 Harshal Jain RK21CHB63 Set-6

63 12105798 Utkrist Ark RK21CHB64 Set-7

64 12106957 Shibin Ziyad RK21CHB65 Set-8

65 12109665 T Tanusree RK21CHB66 Set-9

66 12103070 Udumula Jayanth Reddy RK21CHB67 Set-10

67 12100568 Mandeep Singh Gill RK21CHB68 Set-11

68 12100863 C S Charithartha Sai RK21CHB69 Set-12

69 12102632 Patel Manavkumar RK21CHB70 Set-13

Page 19

You might also like