Write A Python Program To Check The Validity of A Password Given by The User. The Password
Write A Python Program To Check The Validity of A Password Given by The User. The Password
Write A Python Program To Check The Validity of A Password Given by The User. The Password
The password
should satisfy the following criteria:
1. Contains at least one letter between a and z
2. Contains at least one number between 5 and 9
3. Contains at least one letter between A and Z
4. Contains at least one special character from *, #, !
2.Python Program to Take in the Marks of 5 Subjects and Display the Grade
3.Python Program to Print all Numbers in a Range Divisible by a Given Number
4.Python Program to Read Two Numbers and Print Their Quotient and Remainder
5.Python Program to Check if a Number is a Palindrome
6. Python Program to Print all Integers that Aren't Divisible by Either 2 or 3 and Lie between 1 and
50.
7. Write a python program to print factorial of a number. Take input from the user.
8. Write the python statement for the following question on the basis of given dataset:
Sales: It is the monthly sales of the car company. 'Yes' implies monthly sales are
more than 8,000, 'no' otherwise
Fit an appropriate model on the given data to predict whether the sales will be more
than 8,000 a month or not. Also, check the accuracy score of the model.
Additionally, the company is planning to launch a new electric SUV car, which will be
expensive and hence company is planning to do high advertising for the same.
Predict what will be the situation of sales for the same.
Fit logistic regression model on the data to predict whether a student will take PCM or
not. Also, Harsh, a male student has scored 98% on aggregate with 96% in maths and
100% in science. Find whether he would take PCM or not using the fitted regression
model.
11. The following data set is for 10 random songs. Divide the data into 3 clusters and find the
accuracy of the model.
Tempo Duration Year of Release
150 210 2020
111 285 2021
97 217 2013
120 252 2019
107 220 2022
140 123 2020
156 283 2019
163 206 2018
103 195 2020
128 208 2012
Tempo: Beats per minute of a song. Basically, how fast or slow is the song
12. The following data is of some customers, who came to take benefit of IKEA's points for buy with
your time program. Fit an appropriate model on the data to find the accuracy of the same, and also
predict that if a 35 year old person, having a salary of 60,000 drives 130 miles on his BMW which
gives him mileage of 7, will purchase goods from IKEA?
13. The following is the data set template of a company that produces automobile.
Yea
Marketing Expense in lacs Sales in the Crores
r
201
5 3.5
1
201
6 4
2
201
4 3
3
201
8 5
4
201
13 9.2
5
201
7 5
6
201 9 6
7
201
10 7.2
8
201
9.5 6.9
9
202
11 8.5
0
As a marketing head of this company build a suitable regression model using the python
libraries to predict the sales of company in future years. 10
14. You have been provided training data including height, weight and T-shirt size of 8 students as
below
Height (in cms) Weight (in kgs) T-Shirt Size
158 58 M
160 60 M
163 60 M
165 62 L
165 65 L
168 62 L
170 64 L
170 68 L
and you need to predict the T-shirt size of a new Student having height 160 cm and weight 62 kgs
using K-Nearest Neighbors algorithm for K=5.
15. Collect the minimum and maximum temperature of your city for a month and present it using a
histogram plot.
16. Following is the dataset regarding the survival of passengers in a train accident
Fit an appropriate Machine learning model to predict whether the person has survived or not.
Also check the accuracy of the model by using the following dataset
Class Age Gender Survived
1st 13 male 0
2nd 33 female 1
3rd 26 male 0
Q. Following is the dataset regarding Debt to Equity ratio and Price to book ratio
of a company
D/E P/B
0.17 6.8
0.71 3.24
0.46 0.05
0.93 0.19
0.11 1.63
0.12 5.07
0.48 3.34
0.05 0.07
0.08 7.92
0.19 0.91
D/E and P/B ratios of 10 companies is given, create 2 clusters for the given
dataset and check in which cluster do the following datapoints fall
D/E P/B
0.65 6.69
0.12 0.83
0.38 3.24
0.05 3.61
0.13 3.39