Python FOR Machine Learning: Course Name

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

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 12109922 Divyanshi Sharma RK21UPA01 Set-1

2 12109323 Khushi Choudhary RK21UPA02 Set-2

3 12110554 Shaik Julfeen Ahmadh RK21UPA03 Set-3

4 12113072 Aniket Sharma RK21UPA04 Set-4

5 12107597 Akshat Keshari RK21UPA05 Set-5

6 12101368 Jugraj Singh Pelia RK21UPA06 Set-6

7 12101273 Chikkam Chiranjeevi Sai Murari RK21UPA07 Set-7

8 12104841 Jaswanth Singh Kumar Lankadasu RK21UPA08 Set-8

9 12113531 Rayan Rafeek RK21UPA09 Set-9

10 12113048 Nitin Kumar Mundhra RK21UPA10 Set-10

11 12114691 Atishay Chugh RK21UPA11 Set-11

12 12106250 Moin Raza Khatri RK21UPA12 Set-12

13 12113435 Garikipati Satvik RK21UPA13 Set-13

14 12114925 Sachin Kumar RK21UPA14 Set-14

15 12115045 Madaka Tulasi Ram RK21UPA15 Set-1

16 12115067 Khushi Gupta RK21UPA16 Set-2

17 12111257 Thota Abhilash Reddy RK21UPA17 Set-3

18 12113626 Anuj Shrivatri RK21UPB18 Set-4

19 12113296 Surya Pratap Singh RK21UPB19 Set-5

20 12103123 Jandhyala Sai Kashyap RK21UPB20 Set-6

21 12102352 Neha Ashwinikumar Parhate RK21UPB21 Set-7

Page 17
22 12107516 Muskan Kaushal RK21UPB22 Set-8

23 12107228 Jai Chaudhary RK21UPB23 Set-9

24 12107820 Kaushambi Chauhan RK21UPB24 Set-10

25 12105513 Ankit Siwach RK21UPB25 Set-11

26 12112397 Santosh James Kalyani RK21UPB26 Set-12

27 12112308 Shaik Ismail RK21UPB27 Set-13

28 12100915 Nived Suresan A RK21UPB28 Set-14

29 12106923 Uday Singh Senger RK21UPB29 Set-1

30 12115196 Kanishka K R RK21UPB30 Set-2

31 12115033 Ashwini Kumar RK21UPB31 Set-3

32 12115007 Satyam Gupta RK21UPB32 Set-4

33 12115337 Muhammed Basil CP RK21UPB33 Set-5

34 12109427 Gopeenandan B R RK21UPB34 Set-6

35 12105016 Shravani Deshpande RK21UPB35 Set-7

Page 18

You might also like