0% found this document useful (0 votes)
111 views64 pages

Sa Lab Manual Final Merged

The document is a lab manual for Statistics & Analytics designed for I/II semester diploma engineering students at Government Polytechnic, Gauribidanur. It outlines practical class requirements, assessment methods, and a detailed index of experiments related to data collection, analysis, and visualization using tools like Google Forms and Microsoft Excel. Additionally, it includes instructions for writing practical records and conducting various statistical experiments.

Uploaded by

y9123578
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)
111 views64 pages

Sa Lab Manual Final Merged

The document is a lab manual for Statistics & Analytics designed for I/II semester diploma engineering students at Government Polytechnic, Gauribidanur. It outlines practical class requirements, assessment methods, and a detailed index of experiments related to data collection, analysis, and visualization using tools like Google Forms and Microsoft Excel. Additionally, it includes instructions for writing practical records and conducting various statistical experiments.

Uploaded by

y9123578
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/ 64

GOVERNMENT OF KARNATAKA

DEPARTMENT OF COLLEGIATE AND TECHNICAL EDUCATION

GOVERNMENT POLYTECHNIC,
GAURIBIDANUR – 561208

STATISTICS & ANALYTICS


LAB MANUAL
For I/II Sem Diploma Engineering Students
of all Programmes
(As per Revised C-20 Curriculum)

Academic Year :

Name : ___________________________________
Reg No : ___________________________________
Programme : ___________________________________
Batch No : ___________________________________

FOR INTERNAL CIRCULATION ONLY

Prepared by
Venugopal C L M.Sc , B.Ed
Lecturer ,
Dept of Science
Government Polytechnic, Gauribidanur
INSTRUCTIONS TO THE STUDENTS
1. The following materials are required for every Practical Class.
i) SA Lab Manual
ii) Practical Record
iii) Observation Book
2. There are two Laboratory classes every week (each class 3 hours duration)
3. 75% of attendance is compulsory for appearing for examination
4. CIE two written tests for 20 marks will be conducted. CIE three skill tests will be conducted for 100
marks(3 hours duration) and obtained marks are scaled down to 20 marks. One Student activity
must be submitted at the end for 20 marks.

SL No Week Assessment Duration Max Marks Conversion


1 rd
3 week CIE-1(Written Test-01 theory) 60 minutes 20 Average of two
2 13th week CIE-2(Written Test-02 theory) 60 minutes 20 written tests- 20 marks
3 th
5 week CIE-3(Skill Test-01) 3 hours 100 Average of three
4 th
7 week CIE-4(Skill Test-02) 3 hours 100 Skill tests – 20 marks
5 th
9 week CIE 5( Skill Test-03) 3 hours 100
6 11th week CIE 6 (Student activity) -------- 20 20 marks
7 Total Continous Internal Evaluation (CIE) Assessment 60 marks
8 Semester End Examination(SEE) (practical 3 hours 100 40 marks
Exam)
Total Marks 100 marks
5. Course Assessment and Evaluation chart.

6. Scheme of Evaluation for both CIE and SEE

Sl No Particulars Max Marks


1 Short answer questions from Unit 1 10 questions X 1 mark = 10
2 Observation 2 Expts X 15 marks = 30
3 Conduction 2 Expts X 10 marks = 20
4 Output and Interpretation of Result 2 Expts X 10 marks = 20
5 Viva Voce (Oral) Both Experiments = 20
Total 100 marks
7. Instructions for writing Practical record :

Ruled Page: i. Date ,Experiment no, Page no


ii. Tittle of the Experiment
iii. Aim , Brief Procedure , Result/Inference
Unruled Page: Take the Print out of output of the Experiment and paste it in the record.
INDEX
Expt No Experiment name Page No
1 Questionnaire containing 25 Closed Ended questions 1-2
2 Preparation of Google form 3-5
3 Sending Google form for survey 6-7
4 Cleaning of data collected from Survey 8-10
5 Frequency Distribution Table 11-12
6 Relative Frequency Distribution Table 13-14
7 Bar Chart creation 15-16
8 Pie chart creation 17-18
9 Line chart creation. 19-20
10 Frequency Polygon 21-22
11 Box Plot 23-24
12 Stem and Leaf Plot 25-26
13 Mean , Mode and Median - Histogram 27-28
14 Range and Quartile 29-30
15 Mean deviation and Quartile deviation 31-32
16 Standard deviation 33-34
17 Variance 35-36
18 Skewness and Kurtosis graph 37-38
19 Python program to convert Decimal to Binary , octal and Hexadecimal 39-40
20 Python program to add 2 integers and 2 strings and print the result. 41-
21 Python program to find the sum of first 10 natural numbers 42
22 Python program to find whether the number is odd or even 43
23 Python program to find the variance and standard deviation for the 44
given data.
24 Python program to display student marks from the record 45
25 Python program to create a labelled Bar graph using matplotlib.pyplot. 46
26 Python program to create a labelled Pie chart using matplotlib.pyplot 47
27 Unit wise Questions and Answers 48-62
Experiment No 1
Prepare a questionnaire (closed end) containing 25 questions for a specified problem
statement:for example experience of an individual in a restaurant
Aim : To prepare 25 closed ended Restaurant Survey Questions to be asked for customer in a
Restaurant.
Questionnaire :
A questionnaire is a list of questions used to collect data about someone or something.
There are two types of questionnaire
1. Closed ended questionnaire : Closed-ended questions can be answered with “Yes” or “No,” or
they have a limited set of possible answers
Ex : a. Are you feeling better today?
b. May I use your pen?
2. Open ended questionnaire : An open-ended questions are questions that cannot be answered
with a "yes" or "no" response. Open-ended questions are broad and can be answered in detail
Ex : a. Tell me about your college
b. How do you see your future?
Essentials of a good questionnaire:
1. Limited number of questions: The number of questions should be limited as far as possible. Normally 15 to
20 questions are sufficient enough for making the required enquiry.
2. Simplicity: The language of the question should be simple and easily understandable.
3. Logically arrange: The question should be arranged logically.
4. Related to the points: Questions should be related to the point. They should not be irrelevant.
5. Avoiding personal questions: Personal questions should be avoided as far as possible. For example, questions
about Income, volume of sales, etc. should not be asked.
Procedure :
1. Write atleast 5 simple close ended questions for each of the following categories to be asked for a
customer in a restaurant in a sheet of paper.
i. Menu Feed back questions
ii. Services feedback questions
iii. Facilities feedback questions
iv. General feedback questions
v. Technical feedback questions
2. Then Open MS word /Google doc in your PC
3. Then Start typing questions already prepared and save (ctrl+s) the document

Output : 25 closed ended Restaurant Survey Questions are prepared


Experiment No 1(Out Put)
PREPARE A QUESTIONNAIRE [CLOSED END] CONGTAINING 25 QUESTIONS FOR EXPERIENCE OF AN
INDIVIDUAL IN A RESTAURANT

Sl Questions Answers
No
1 Was this your first visit to our Restaurant? Yes / No
2 Are our hours convenient ? Yes / No
3 Is our restaurant would be a good choice for Yes / No
Celebration?
4 How did you hear about our restaurant? Social media / Personal
recommendation / Advertisement
5 Was it easy to find our restaurant? Yes / No
6 Did you have any trouble with parking? Yes / No
7 Were the bath rooms and other facilities clean ? Yes / No
8 Were the seats and tables comfortable? Yes / No
9 How was the lighting level ? too bright/too dim /just right
10 How was the music volume ? too loud / too soft / just right
11 Did everything comeout exactly as you ordered it ? Yes / No
12 Was your food warm when it arrived? Yes / No
13 Did you order alcoholoic beverages? Yes / No
14 Was your service friendly and helpful Yes / No
15 Did the host greet you upon arrival? Yes / No
16 Did your food come out fast enough? Yes / No
17 Did the manager visit your table? Yes / No
18 Did your server provide recommendations? Yes / No
19 Was your water refilled in a timely manner? Yes / No
20 Was the food tasty ? Yes / No
21 Did you enjoy viewing our menu on your phone? Yes / No
22 Did you use any discount on special offers? Yes / No
23 Did you make reservation for your visit? Yes / No
24 How likely that you would come back? Daily/Sometimes/never
25 Are you satisfied with the online ordering of our food
on the website? Yes / No
Assignment : 1. Prepare a questionnaire containing 20 closed end questions about the facilities and
services provided to passengers in KSRTC bus stand.
2. Prepare a questionnaire containing 20 closed end questions about the feedback from a student
in a Government school
3.Prepare a questionnaire containing 20 closed end questions about the feedback from a patient in a
Government Hospital
Experiment No 2
Prepare a Google form for a specified problem statement to collect the data set
(For example : Questionnaire to conduct online Quiz)

Aim : To prepare a Google form to conduct online quiz


Procedure :
1. Log in to your gmail account.
2. Click on google apps icon indicated with 9 dots.
3. Click on google forms. Then a blank form get opened.
4. Type the tittle and form description.
5. At the top right Click settings -> Click “Quizzes”-> Tick ON “make this a Quiz” -> Click “save”.
6. Type the question and assign multiple options. Click “+” to add new question
7. To assign marks/points for correct answers Clickon “ Add answer key”-> Tick Correct answer-
> assign “1” point.
8. After framing all questions ,Click “send”
9. One can share link or can copylink and send via mail or whats app.

Output : A Google form to conduct online quiz is prepared.


Experiment No 2(Out Put)
Prepare a Google form for a specified problem statement to collect the data set
(For example : Questionnaire to conduct online Quiz)
Experiment No 3
Send out a survey for a Problem Statement to 20 persons by google forms and collect the
dataset in spreadsheet.

Aim: To send out a survey for a Problem Statement to 20 persons by google forms and collect the
dataset in spreadsheet.
Procedure :
1. Prepare a online survey in google form with the steps as explained in experiment 2
(transform the same questions into google form)
2. Send the link to at least 25 people via E-mail or whatsapp and ask them to fill and submit.
3. Open concerned survey google form
4. At the top, click “Responses”. You can see the submitted responses in summary,
question, or Individual.
5. Click “individual” to see response one by one . To move between individuals , click
‘Previous’ < or ‘Next’>.
6. To collect the data click on 3 dots .
7. Collect the data into your E-mail ID or select the destination in your google drive or
download into your PC or take printout or delete all collected data.

Result /Inference : Google form to survey for a Problem statement was sent to 20 persons and their
response are collected in a spread sheet.
Experiment No 3[Output]
Send out a survey for a Problem Statement to 20 persons by google forms and collect the dataset in
spreadsheet.
Experiment No 4
Remove Duplicate or Irrelevant observations from the dataset provided , including
Duplicate observations or Irrelevant observations.

Aim: To Remove Duplicate or Irrelevant observations from the dataset provided , including Duplicate
observations or Irrelevant observations
Procedure :
1. Go to google.com and log in to your google account.
2. Click on google apps ( 9 dots ) -> Select Drive -> click on My drive
3. Open Experiment no 3 Google form -> Click on responses -> click on create spread sheet-> the
responses of Experiment no 3 will be displayed.
4. To identify the duplicates follow below steps.
i. For instance , select Column A -> Format -> Conditional formatting
ii. Under format rules open the drop-down list and select “Custom formula is”
iii. Enter the value for custom formula as “ =count if (A1:A,A1)>1”
iv. Below Format rules, clicking on Formatting styles, set a different colour for highlighted
duplicates. To do that Click the “Fill colour” icon and select the preferred shade(Ex : Red)
v. Once finished , Click “Done” to highlight the duplicates in a single column.
vi. Similarly , if we have to do it for column C, the formula becomes , “ =count if (C1:C,C1)>1” and
we do it so on for other columns as well.
5. To delete the duplicates follow below steps.
i. Select a column from where you want to remove the duplicates.
ii. Click Data -> Remove Duplicates.
iii. We will see a pop-up window -> Tick the box next to Data has header now -> Click ‘Remove
duplicates’ -> Click ‘’Done’’ .
iv. Repeat the steps for other columns as well.
Experiment No 4 (Output)
Remove Duplicate or Irrelevant observations from the dataset provided , including
Duplicate observations or Irrelevant observations
In the data set given below contains the malnutrition in kids in different states of India, based on
the three reasons is given. The data set contains duplicates which are highlighted. Now Duplicates
are removed as shown below

Fig 1. Highlighting Duplicate data


Fig 2 Removing Duplicate Data

Fig 3 Duplicate Data Removed.


Experiment No 5
In Microsoft Excel spread sheet draw the frequency distribution table for the randomly
generated data (data set should contain minimum 50 data) .
Aim: To draw the frequency distribution table for the randomly generated data in MS excel spread sheet
Procedure:
1. Open MS excel sheet and Type ‘ Name of student ‘ in one column and ‘Marks’ in another column
2. Under Name of student column type Student 01 and Student 02 drag it up to student 50
3. Generate random data of 50 students using “ RANDBETWEEN” formula by taking limits 1 to 100 [
=RANDBETWEEN(1,100)] in a separate column
4. Copy these values and paste as values in the Marks Column (otherwise values change every time
when you press enter)
5. Now write the class interval and Bin values (upper limit values) as given below.
class
interval Bin
0-20 20
21-40 40
41-60 60
61-80 80
81-100 100
6. Then Click Data-> Click “ Data analysis” -> select “Histogram”-> Click “OK” .
7. Then in the page displayed, select “entire marks” for input range, select “Bin values” for bin range
, Tick label box, and select a “blank cell“ for out put range and click “OK”. Then the following table
get displayed.
Bin Frequency
20 7
40 8
60 10
80 10
100 15
More 0

8. Then copy the Class interval column and frequency column separately and paste in the separate
column . This is the Frequency distribution table,
Out put : The Frequency Distribution Table for the given data is constructed.
Experiment No 5 (Output)
Experiment No 5
To draw the frequency distribution table for the randomly generated data

Name of student Marks class interval upperlimit frequency


student 1 79 0-20 20 5
student 2 100 21-40 40 13
student 3 68 41-60 60 12
student 4 76 61-80 80 9
student 5 52 81-100 100 11
student 6 78
student 7 76 Frequency distribution table
student 8 11
student 9 59
student 10 38
student 11 85
student 12 53
student 13 24
student 14 85
student 15 21
student 16 40
student 17 10
student 18 93
student 19 46
student 20 95
student 21 19
student 22 87
student 23 98
student 24 63
student 25 30
student 26 64
student 27 94
student 28 63
student 29 38
student 30 45
student 31 83
student 32 90
student 33 56
student 34 25
student 35 52
student 36 55
student 37 29
student 38 32
student 39 51
student 40 49
student 41 4
student 42 92
student 43 58
student 44 73
student 45 53
student 46 35
student 47 23
student 48 36
student 49 11
student 50 22
Experiment No 6
In Microsoft Excel spread sheet draw the relative frequency distribution table for the
randomly generated data (data set should contain minimum 50 data) .
Aim: To draw the relative frequency distribution table for the randomly generated data in MS excel
spreadsheet
Procedure:
1. Open MS excel sheet and Type ‘ Name of student ‘ in one column and ‘Marks’ in another column
2. Under Name of student column type Student 01 and Student 02 drag it up to student 50
3. Generate random data of 50 students using “ RANDBETWEEN” formula by taking limits 1 to 100 [
=RANDBETWEEN(1,100)] in a separate column
4. Copy these values and paste as values in the Marks Column (otherwise values change every time
when you press enter)
5. Now write the class interval and Bin values (upper limit values) as given below.
class interval Bin
0-20 20
21-40 40
41-60 60
61-80 80
81-100 100

6. Then Click Data-> Click “ Data analysis” -> select “Histogram”-> Click “OK” .
7. Then in the page displayed, select “entire marks” for input range, select “Bin values” for bin range
, Tick label box, and select a “blank cell“ for out put range and click “OK”. Then the following table
get displayed.
Bin Frequency
20 7
40 8
60 10
80 10
100 15

8. Then copy the Class interval column and frequency column separately and paste in the separate
column . This is the Frequency distribution table,
9. Find the “Total Frequency ” and insert another column for “Relative Frequency” and use the formula
“frequency/Total frequency [ = frequency value/50 ] and press “Enter”. Then go to the corner of
the cell and drag it to the end to get relative frequency. The total of all relative frequencies should
be 1.
Output : The relative frequency distribution table for the given data is constructed.
Experiment No 6 (Output)
EXPERIMENT NO 6 :
To draw the relative frequency distribution table for the randomly generated data

Name of student Marks class interval Bin (upperlimit) Bin (upperlimit) Frequency
student 1 69 1-20 20 20 9
student 2 12 21-40 40 40 13
student 3 25 41-60 60 60 9
student 4 70 61-80 80 80 13
student 5 81 81-100 100 100 6
student 6 87 More 0
student 7 24
student 8 22
student 9 77
student 10 66 class interval Frequency relative frequency
student 11 94 1-20 9 0.18
student 12 23 21-40 13 0.26
student 13 68 41-60 9 0.18
student 14 61 61-80 13 0.26
student 15 50 81-100 6 0.12
student 16 23 Total 50 1
student 17 44 Relative frequency distribution table
student 18 78
student 19 95
student 20 62
student 21 52
student 22 68
student 23 35
student 24 17
student 25 43
student 26 58
student 27 32
student 28 62
student 29 10
student 30 41
student 31 56
student 32 28
student 33 29
student 34 28
student 35 7
student 36 24
student 37 77
student 38 37
student 39 1
student 40 90
student 41 78
student 42 43
student 43 34
student 44 8
student 45 57
student 46 67
student 47 81
student 48 16
student 49 15
student 50 4
Experiment No 7
Using Microsoft Excel spread sheet plot bar graph for the data collected from 50 people(
for example, conduct a survey on the favorite fruit of a person in your locality(restricting
to 5 to 6 fruits). Explain the bar graph with minimum 30 words.

Aim: Bar graph for the data collected survey on the favourite fruits from 50 persons.
Procedure :
1. Choose 04 to 05 fruits such as Apple,Orange,Banana,Grapes and enter these fruits randomly to 50
persons .
Name of Person Fruit name
Person 1 Apple
person 2 Orange
Person 3 Banana
Person 4 Grapes
Person 5 Apple
Person 6 Orange

2. Now write Fruits names and Frequency (count of fruits ) in a table as given below
Fruit name Count
Apple
Orange
Banana
Grapes

3. Now use “COUNTIF“ formula to find the count of each place by using [=COUNTIF(range,criteria)]
and select the data range and select the the place name ,close bracket and press enter to get the
count of that place.
4. Repeat the above steps to find the count of other places
Fruit name Count
Apple 15
Orange 14
Banana 14
Grapes 7

5. Now select the Fruit name and count, and press enter to get the bargraph and it can be modified
using chart elements.
Output : The barchart is plotted for the given data .
Experiment No 7(Output)
EXPT NO 7
To draw a Bargrap for survey of favourite fruits of 50 persons in your locality (restricted to 4 to 6 fruits)

Name of Person Fruit name


Person 1 Apple Fruit name Count
person 2 Orange Apple 15
Person 3 Banana Orange 14
Person 4 Grapes Banana 14
Person 5 Apple Grapes 7
Person 6 Orange Total 50
Person 7 Banana
Person 8 Apple
Person 9 Orange Barchart
Person 10 Banana
18
Person 11 Grapes 16 15
14 14
Person 12 Apple 14
Person 13 Orange 12
Person 14 Banana
Count

10
Person 15 Apple 8 7
Person 16 Orange 6
Person 17 Banana 4
Person 18 Grapes 2
0
Person 19 Apple Apple Orange Banana Grapes
Person 20 Orange Count 15 14 14 7
Person 21 Banana Fruit name
Person 22 Apple
Person 23 Orange
Person 24 Banana
Person 25 Grapes
Person 26 Apple
Person 27 Orange
Person 28 Banana
Person 29 Apple
Person 30 Orange
Person 31 Banana
Person 32 Grapes
Person 33 Apple
Person 34 Orange
Person 35 Banana
Person 36 Apple
Person 37 Orange
Person 38 Banana
Person 39 Grapes
Person 40 Apple
Person 41 Orange
Person 42 Banana
Person 43 Apple
Person 44 Orange
Person 45 Banana
Person 46 Grapes
Person 47 Apple
Person 48 Orange
Person 49 Banana
Person 50 Apple
Experiment No 8
Using Microsoft Excel spread sheet plot pie chart for the data collected from 50 people(
for example, conduct a survey on the smokers with respect to their ages in your locality.
Explain the pie chart with minimum 30 words.
Aim : To plot Pie chart for a Survey on smokers with respect to age in MS excel spread sheet.
Procedure :
1. Open MS excel sheet and Type ‘ Smoker count ‘ in one column and ‘Age ’ in another column
2. Click ‘Insert” -> Pivot table -> OK
3. In Pivot table click “Table/range”-> Select Age column -> click and Choose Existing worksheet and
click ‘Location’ -> select any blank cell -> click OK
4. On rightside of the screen ,Pivot table fields get displayed
5. Tick “Age of Smokers” and drag to “Row Labels” . Then Click Value Field settings-> Select “count of
age” click ok
6. Then click on any one cell of Row labels -> Right click -> select Group-> for grouping ->Define starting
at ending value with common difference like 10-> Click OK. Table will look like as shown below.
Now Row labels indicates Age Range
Row Labels Count of Age
20-29 7
30-39 10
40-49 8
50-59 9
60-69 1
70-79 10
80-90 5
Grand Total 50

7. Select above table values -> Click insert -> Pie chart . Pie chart get displayed.
8. Then Right click on Pie graph -> Click “Format data Labels” -> Tick values, percentage, label outside
-> click OK
Output : Pie chart for a Survey on smokers with respect to age in MS excel spread sheet is
constructed
Experiment No 8 (Output)
EXPERIMENT NO 8 :
To plot Pie chart for a Survey on smokers with respect to age in MS excel spread sheet.

Smoker count Age


Smoker1 71
Smoker2 72 Row Labels Count of Age
Smoker3 36 20-29 7
Smoker4 75 30-39 10
Smoker5 48 40-49 8
Smoker6 62 50-59 9
Smoker7 87 60-69 1
Smoker8 23 70-79 10
Smoker9 34 80-90 5
Smoker10 60 Grand Total 50
Smoker11 81
Smoker12 22
Smoker13 69
Smoker14 82
Smoker15 38 Total
Smoker16 76
5, 10% 7, 14%
Smoker17 84
Smoker18 63 20-29
Smoker19 37
10, 20% 30-39
Smoker20 41
40-49
Smoker21 77 10, 20%
Smoker22 83 50-59

Smoker23 77 1, 2% 60-69
Smoker24 43 70-79
Smoker25 65 80-90
9, 18% 8, 16%
Smoker26 49
Smoker27 39
Smoker28 68
Smoker29 33
Smoker30 66
Smoker31 42
Smoker32 79
Smoker33 90
Smoker34 22
Smoker35 87
Smoker36 78
Smoker37 41
Smoker38 73
Smoker39 78
Smoker40 69
Smoker41 35
Smoker42 90
Smoker43 41
Smoker44 62
Smoker45 43
Smoker46 22
Smoker47 53
Smoker48 70
Smoker49 38
Smoker50 72
Experiment No 9
Using Microsoft Excel spread sheet draw a line graph for the given dataset.
Aim: To draw the line graph for the daily pocket expenses of 50 students in MS excel spreadsheet
Procedure:
1. Open MS excel sheet and Type ‘ Name of student ‘ in one column and ‘Expenses’ in another column
2. Under Name of student column type Student 01 and Student 02 drag it up to student 50
3. Generate the pocket expenses randomly for 50 students (or enter manually)
4. Then select complete table -> Click “insert” -> click “Line chart”
5. Then Line chart get displayed.
Output: Line graph for the given data is plotted.
Experiment No 9 (Output)
Experiment No 9
To draw a Line graph for the given data set

Student name Expenses


student 1 20 Expenses
student 2 188
350
student 3 196
student 4 198 300
student 5 136 250
student 6 192
200
student 7 248
student 8 40 150
student 9 276
100
student 10 12
student 11 264 50
student 12 50 0
student 13 107

student 3

student 9
student 1

student 5
student 7

student 15

student 21
student 23

student 29

student 35

student 41

student 47
student 49
student 11
student 13

student 17
student 19

student 25
student 27

student 31
student 33

student 37
student 39

student 43
student 45
student 14 264
student 15 268
student 16 64
student 17 148
student 18 127
student 19 126
student 20 257
student 21 289
student 22 122
student 23 143
student 24 144
student 25 80
student 26 75
student 27 228
student 28 184
student 29 296
student 30 104
student 31 144
student 32 101
student 33 153
student 34 36
student 35 108
student 36 171
student 37 36
student 38 32
student 39 114
student 40 284
student 41 61
student 42 252
student 43 176
student 44 77
student 45 255
student 46 198
student 47 204
student 48 71
student 49 15
student 50 124
Experiment No 10
Using Microsoft Excel spread sheet draw frequency polygon and frequency curve for the
data collected from 50 people.
Aim : To draw frequency polygon and frequency curve for 50 students in a class in 5 subjects in previous
exam
Procedure :

1. Open MS excel sheet and Type ‘ Name of student ‘ in one column SUB1, SUB2,SUB3,SUB4,
SUB 5, in another columns
2. Under Name of student column type Student 01 and Student 02 drag it up to student 50
3. Enter the marks in 5 subjects manually (or generate randomly)
4. Create a “class interval” and “upper limit” of data set table manually
5. Click ‘Data’ -> Data analysis -> Histogram -> OK
6. Click input range tab -> select SUB 1 marks of all students
Click Bin range tab -> select all values of upper limit
Click in output range -> Select few empty cells
Tick cumulative percentage -> OK
7. Repeat step 5 and 6 for all subjects
8. Frequency distribution table get displayed for all 5 subjects
9. Now by Pressing control Key , select the frequency values of all 5 subjects
10. Then Click -> insert-> Line chart . Then Frequency polygon get displayed .
Out put : The frequency polygon is plotted for the given data
Experiment No 10 (Output)
Experiment no 10
To draw Frequency polygon and curve for the marks obtained by 50 students in 5 subjects in previous exam
SUB1
Name of student SUB1 SUB2 SUB3 SUB4 SUB5 Class interval Bin Bin FrequencyCumulative %
student 1 97 54 45 49 10 1-20 20 20 5 10.00%
student 2 59 25 82 48 39 21-40 40 40 9 28.00%
student 3 52 31 69 22 70 41-60 60 60 10 48.00%
student 4 72 40 91 91 39 61-80 80 80 13 74.00%
student 5 38 31 11 87 67 81-100 100 100 13 100.00%
student 6 37 90 51 98 66 More 0 100.00%
student 7 54 33 80 33 98
student 8 62 92 59 59 36 SUB 2 SUB 3
student 9 34 13 76 94 81 Bin Frequency Cumulative % Bin Frequency Cumulative %
student 10 87 24 53 60 84 20 6 12.00% 20 5 10.00%
student 11 90 29 33 43 38 40 17 46.00% 40 11 32.00%
student 12 19 33 15 90 86 60 4 54.00% 60 11 54.00%
student 13 71 12 33 98 69 80 12 78.00% 80 10 74.00%
student 14 44 70 27 56 70 100 11 100.00% 100 13 100.00%
student 15 33 16 78 91 85 More 0 100.00% More 0 100.00%
student 16 32 27 98 70 90
student 17 92 37 81 53 61 SUB 4 SUB 5
student 18 54 89 59 72 42 Bin Frequency Cumulative % Bin Frequency Cumulative %
student 19 85 84 57 81 91 20 1 2.00% 20 6 12.24%
student 20 84 72 95 80 73 40 9 20.00% 40 8 28.57%
student 21 62 72 82 92 76 60 15 50.00% 60 7 42.86%
student 22 68 19 41 79 94 80 13 76.00% 80 14 71.43%
student 23 69 53 93 65 86 100 12 100.00% 100 14 100.00%
student 24 12 76 66 27 69 More 0 100.00% More 0 100.00%
student 25 10 53 81 91 76
student 26 81 71 47 80 24
student 27 71 97 76 22 77
student 28 49 99 55 64 80
student 29 12 26 49 82 14
student 30 93 29 39 33 57 FREQUENCY POLYGON
student 31 66 12 49 53 88 18
student 32 37 78 12 65 95 16
student 33 72 72 95 89 63 14
student 34 21 90 10 53 11 12
student 35 69 69 89 55 44 10
student 36 45 24 91 30 16
FREQUENCY->

8
student 37 68 32 28 65 88 6
student 38 90 84 71 58 92 4
student 39 67 61 74 39 54 2
student 40 47 77 30 41 32 0
student 41 87 25 83 32 11 1 2 3 4 5 6
student 42 92 95 24 64 91 SUB->
student 43 17 66 18 53 23
student 44 45 83 21 72 57
student 45 88 19 28 11 29
student 46 34 26 24 38 46
student 47 92 90 37 60 42
student 48 32 78 75 79 19
student 49 65 46 77 49 65
student 50 55 24 85 74 25
Experiment No 11
Using Microsoft Excel spread sheet construct a Boxplot curve for the given data set
Aim: To construct a Boxplot for the number of passengers in a Flat form at different time in a day
Procedure :
1. Open MS excel sheet and Type ‘ Sl no ‘ in one column , ‘Timings ‘ in another column and No of
passangers in one more column .
2. Enter the timings and No of Passangers manually (or generate randomly)
3. Find the Minimum[= MIN(DATA) ] ,Quartile1[=QUARTILE(DATA,1)],
Median[=MEDIAN(DATA)], Quartile3[=QUARTILE (DATA, 3) and maximum[=MAX(DATA)] values .
4. Then Select No of passengers column and Click’ Insert’-> recommended charts-> click ALL-> Select
Boxplot chart
5. Then the Boxplot chart get displayed.

Output : The Box plot is constructed for the given data set.
Experiment No 11(Output)
Experiment no 11
To construct a Boxplot for the given Data set.

Sl no Timings No of Passangers
1 6.00 8 MIN 4
2 6.30 81 Q1 34.5
3 7.00 86 MEDIAN 94.5
4 7.30 15 Q3 136.75
5 8.00 68 MAX 199
6 8.30 16
7 9.00 45
8 9.30 142 0
9 10.00 113
10 10.30 103
11 11.00 124
12 11.30 96
13 12.00 51
14 12.30 27
15 13.00 188
16 13.30 187
17 14.00 97
18 14.30 128
19 15.00 152
20 15.30 56
21 16.00 175
22 16.30 93
23 17.00 73
24 17.30 71
25 18.00 118
26 18.30 103
27 19.00 107
28 19.30 47
29 20.00 75
30 20.30 19
31 21.00 4
32 21.30 108
33 22.00 195
34 22.30 25
35 23.00 23
36 23.30 36
37 24.00 152
38 1.15 24
39 2.15 12
40 3.15 30
41 4.15 36
42 6.15 187
43 7.15 151
44 8.15 135
45 9.15 13
46 10.15 104
47 11.15 149
48 12.15 199
49 12.45 129
50 12.55 157
Experiment No 12
Using Microsoft Excel spread sheet construct a leaf plot for the given dataset. Explain the
graph with minimum 30 words.
Aim: To construct a leaf plot for the given data set (marks scored in a subject by 50 students)
Procedure:
1. Open MS excel sheet and Type ‘ Name of student ‘ in one column and ‘Marks’ in another column
2. Under Name of student column type Student 01 and Student 02 drag it up to student 50
3. Using “ RANDBETWEEN” formula by taking limits 10 to 99 [ =RANDBETWEEN(10,99)] in a separate
column , generate the marks for 50 students.
4. Copy these values and paste in the Marks Column (otherwise values change every time when you
press enter)
6. Find the Minimum[= MIN(DATA) ] and maximum[=MAX(DATA)] values of the
5. Enter ‘stem value’ in one column and ‘Leaf value’ in another column
6. Enter 1 to 9 in stem value column
7. To find leaf value for stem value 1 use the following formula
=REPT("0",COUNTIF($C$6:$C$55,E16*10+0))
&REPT("1",COUNTIF($C$6:$C$55,E16*10+1))
&REPT("2",COUNTIF($C$6:$C$55,E16*10+2))
&REPT("3",COUNTIF($C$6:$C$55,E16*10+3))
&REPT("4",COUNTIF($C$6:$C$55,E16*10+4))
&REPT("5",COUNTIF($C$6:$C$55,E16*10+5))
&REPT("6",COUNTIF($C$6:$C$55,E16*10+6))
&REPT("7",COUNTIF($C$6:$C$55,E16*10+7))
&REPT("8",COUNTIF($C$6:$C$55,E16*10+8))
&REPT("9",COUNTIF($C$6:$C$55,E16*10+9))
[Note : to get $ symbol , after selecting data in COUNTIF function, by holding “fn” key press F4 key]
8. Then Click on the first leaf value and drag it up to 9 th value . Leaf values for all stem values get
displayed.
Output : A Leaf plot for the given data set is constructed

Stem Leaf
1 0 8 9
2 02566889
3 2237
4 112234445566
5 6
6 2334578
7 02378
8 01377
9 0 2 3 5 8
Experiment No 12(Output)
Experiment no 12
To construct a Leaf plot for the given data set

Name of student Marks


Student 1 25 MIN 10
Student 2 41 MAX 98
Student 3 98
Student 4 68
Student 5 56 Stem Leaf
Student 6 42 1 089
Student 7 83 2 02566889
Student 8 63 3 2237
Student 9 73 4 112234445566
Student 10 43 5 6
Student 11 90 6 2334578
Student 12 93 7 02378
Student 13 44 8 01377
Student 14 65 9 02358
Student 15 20
Student 16 87
Student 17 81
Student 18 62
Student 19 44
Student 20 80
Student 21 45
Student 22 67
Student 23 28
Student 24 44
Student 25 10
Student 26 32
Student 27 95
Student 28 92
Student 29 29
Student 30 45
Student 31 46
Student 32 64
Student 33 63
Student 34 72
Student 35 28
Student 36 46
Student 37 22
Student 38 26
Student 39 32
Student 40 18
Student 41 37
Student 42 42
Student 43 87
Student 44 77
Student 45 19
Student 46 70
Student 47 41
Student 48 78
Student 49 33
Student 50 26
Experiment No 13
Using Microsoft Excel spread sheet find the Mean, Median and Mode for the data
(univariate data) given and also represent them in a Histogram.
Aim: To find the Mean, Median and Mode for the given data (height of 50 students in a class) and also
represent them in a Histogram.
Procedure:
1. Open MS excel sheet and Type ‘ Name of student ‘ in one column and ‘Height in cm’ in another
column
2. Under Name of student column type Student 01 and Student 02 drag it up to student 50
3. Generate random data of 50 students using “ RANDBETWEEN” formula by taking limits 90 to 200 [
=RANDBETWEEN(90,200)] in a separate column
4. Copy these values and paste as values in the Height Column (otherwise values change every time
when you press enter)
5. Find Mean[=AVERAGE(HEIGHT)], Median[=MEDIAN(HEIGHT)] and Mode[=MODE(HEIGHT)]
using the formula
Mean =AVERAGE(data)
Median =MEDIAN(data)
Mode =MODE (data)

6. Then select entire data(height) -> click “insert”->select “Recommended charts”->click “All charts”->
select “Histogram” -> click “OK”
7. Then Histogram chart get displayed. Rename the tittle as Histogram .
Out put : Mean, Median and Mode for the given data is found and the data is represented in
Histogram.
Experiment No 13(Output)
Experiment No 13
To find Mean,Median and Mode for heights of 50 students in a class and represent them in Histogram

Name of student Height in cm


student 1 140 Mean 141.74
student2 106 Median 148.5
student 3 97 Mode 157
student 4 157
student 5 163
student 6 116
student 7 167
student 8 115
student 9 154
student 10 103 Frequency
student 11 140
student 12 172
student 13 171
student 14 104
student 15 157
student 16 122
student 17 122
student 18 155
student 19 115 Age range ->
student 20 138
student 21 160
student 22 99
student 23 146
student 24 158
student 25 175
student 26 119
student 27 170
student 28 127
student 29 96
student 30 138
student 31 163
student 32 105
student 33 163
student 34 121
student 35 170
student 36 175
student 37 106
student 38 151
student 39 171
student 40 134
student 41 159
student 42 103
student 43 172
student 44 142
student 45 169
student 46 179
student 47 157
student 48 158
student 49 115
student 50 172
Experiment No 14
Generate a 50 random data sample (even and odd number dataset) using Microsoft
Excel spread sheet and determine the range and Quartiles

Aim : To generate a 50 random data sample (even and odd number dataset) using Microsoft Excel
spread sheet and determine the range and Quartiles
Procedure:
1. Open MS excel sheet and Type ‘ Sl no ‘ in one column and ‘Even data set’ in another column and
also “Odd data set” in one more column
2. Enter 50 even numbers randomly and 50 odd numbers manually
3. Then Find Min, Quartile 1, Quartile 2, Quartile 3, and Max, values for even data set using the formula

Min =MIN (data)


Quartile1(Q1) =QUARTILE.EXC (data,1)
Quartile2(Q2) =QUARTILE.EXC (data,1)
Quartile3(Q3) =QUARTILE.EXC (data,1)
Max ==Max(data)
4. Then Calculate Range and Inter Quartile Range using the following formula
Range= Max-Min
IQR= Q3-Q1
5. Repeat the step (3) and step(4) for Odd data set also.

Out Put : The Range and Quartiles for Even data set and Odd data set is determined.
Experiment No 14 (Output)
Experiment No 14
To generate a 50 random data sample (even and odd number dataset) using Microsoft Excel spread sheet and determine the range and Quartiles

Sl No Even data set For Even data Sl No Odd data set For Odd data
1 10 1 21
2 12 Min 2 2 23 Min 1
3 14 Quartile1(Q1) 25.5 3 25 Quartile1(Q1) 24.5
4 16 Quartile2(Q2) 51 4 27 Quartile2(Q2) 50
5 18 Quartile3(Q3) 76.5 5 29 Quartile3(Q3) 75.5
6 20 Max 100 6 31 Max 99
7 22 7 33
8 2 Range= Max-Min 98 8 15 Range= Max-Min 98
9 4 IQR= Q3-Q1 51 9 17 IQR= Q3-Q1 51
10 6 10 19
11 8 11 1
12 24 12 3
13 26 13 5
14 28 14 7
15 30 15 9
16 32 16 11
17 34 17 13
18 36 18 35
19 38 19 37
20 40 20 39
21 42 21 41
22 44 22 43
23 46 23 45
24 48 24 47
25 50 25 49
26 52 26 51
27 54 27 53
28 56 28 55
29 58 29 57
30 60 30 59
31 62 31 61
32 64 32 63
33 66 33 65
34 68 34 67
35 70 35 69
36 72 36 71
37 74 37 73
38 76 38 75
39 78 39 77
40 80 40 79
41 82 41 81
42 84 42 83
43 86 43 85
44 88 44 87
45 90 45 89
46 92 46 91
47 94 47 93
48 96 48 95
49 98 49 97
50 100 50 99
Experiment No 15
Collect the current Yield of a crop from 50 different persons in your locality and
determine Mean deviation and Quartile deviation in Microsoft Excel spread sheet.
Aim: To collect the current yield of Ragi crop from 50 different persons and to determine Mean
deviation and Quartile deviation in MS Excel spread sheet
Procedure:
1. Open MS excel sheet and Type ‘ Person Name ‘ in first column , ‘Ragi crop yield(Quintal)’ in second
column, “Deviation” in third column and “Absolute deviation(ABS)” in fourth column.
2. Under “Person name” column type Person 01 and Person 02 drag it up to Person 50
3. Generate random yield data of 50 persons using “ RANDBETWEEN” formula by taking limits 10 to 50
“ =RANDBETWEEN(10,50)” in a separate column
4. Copy these values and paste as values in the Ragi yield Column (otherwise values change every time
when you press enter)
5. Then Find Mean, Quartile 1 and Quartile 3 values for crop yield data set using the formula

Mean =AVERAGE (data)


Quartile1(Q1) =QUARTILE.EXC (data,1)
Quartile3(Q3) =QUARTILE.EXC (data,3)

6. Then calculate Quartile deviation using the formula


Quartile deviation = (Q3-Q1)/2
7. Then select first cell below Deviation column-> insert the formula “=(crop yield value-Mean)” OR
[=C6-$F$6] where C6 is first value of crop yield and F6 is Mean value
( To get $F$6 , After selecting mean value Press “fn” key+F4 key )
8. Select first deviation value and drag it up to 50 values. Then both +ve and -ve values get displayed.
9. To get +ve values in Absolute deviation column, select first cell below Absolute deviation column ->
apply the formula [=ABS (deviation value) and enter to get first absolute value.
10. Then select first absolute value and drag it up to 50 values
11. Then calculate “Mean Deviation” in a separate cell using the formula
[ =AVERAGE (All Absolute deviation values)]

Output: Mean deviation and Quartile deviation for the given data (yield of Ragi crop from 50
different persons) is determined.
Experiment No 15 (Output)
Experiment No 15
To dtermine Mean deviation and Quartile deviation in MS Excel spread sheet for the data of current yield of crop (Ragi) collected
from 50 different persons.

Deviation Absolute
Person Name Ragi crop yield ( Quintals) (Yield-Mean) deviation(ABS) Mean 31.38
person1 50 18.62 18.62 Quartile 1(Q1) 22
person2 20 -11.38 11.38 Quartile 3(Q3) 43
person3 42 10.62 10.62
person4 33 1.62 1.62 Quartile deviation 10.5
person5 23 -8.38 8.38 (Q3-Q1)/2
person6 36 4.62 4.62
person7 20 -11.38 11.38 Mean deviation 10.2696
person8 34 2.62 2.62
person9 47 15.62 15.62
person10 38 6.62 6.62
person11 11 -20.38 20.38
person12 21 -10.38 10.38
person13 34 2.62 2.62
person14 22 -9.38 9.38
person15 46 14.62 14.62
person16 28 -3.38 3.38
person17 22 -9.38 9.38
person18 46 14.62 14.62
person19 23 -8.38 8.38
person20 45 13.62 13.62
person21 43 11.62 11.62
person22 34 2.62 2.62
person23 26 -5.38 5.38
person24 23 -8.38 8.38
person25 43 11.62 11.62
person26 25 -6.38 6.38
person27 48 16.62 16.62
person28 39 7.62 7.62
person29 44 12.62 12.62
person30 22 -9.38 9.38
person31 17 -14.38 14.38
person32 23 -8.38 8.38
person33 46 14.62 14.62
person34 18 -13.38 13.38
person35 34 2.62 2.62
person36 35 3.62 3.62
person37 10 -21.38 21.38
person38 38 6.62 6.62
person39 14 -17.38 17.38
person40 44 12.62 12.62
person41 41 9.62 9.62
person42 44 12.62 12.62
person43 33 1.62 1.62
person44 44 12.62 12.62
person45 10 -21.38 21.38
person46 23 -8.38 8.38
person47 19 -12.38 12.38
person48 43 11.62 11.62
person49 27 -4.38 4.38
person50 18 -13.38 13.38
Experiment No 16
Collect the data of any 2 livestock population from 50 different houses in your locality
and determine standard deviation for both the two separately in Microsoft excel spread
sheet and brief your inference with less than 30 words.
Aim: To collect the data of Goat population and Sheep population from 50 different houses and to
determine standard deviation for both the two separately in MS Excel spread sheet.
Procedure:
1. Open MS excel sheet and Type ‘ House name ‘ in first column , ‘Goats’ in second column, “Sheep”
in third column .
2. Under “House name” column type H1 and H2 drag it up to H50.
3. Generate randomly Goat population of 50 Houses using “ RANDBETWEEN” formula by taking limits
1 to 50 “ =RANDBETWEEN(10,50)” in a separate column.
4. Copy these values and paste as values in the Goat column. (otherwise values change every time
when you press enter)
5. Similarly Generate Sheep population randomly and Copy the values and paste as values in the Sheep
column.
6. Then find the standard deviation of the Goat population using the formula
“=STDEV.P(Select all data values of Goat)”
7. Similarly find the standard deviation of the Sheep population using the formula
“=STDEV.P(Select all data values of Sheep)”
Out put : The standard deviation for Goat population and Sheep population are determined.
Experiment No 16 (Output)
Experiment No 16
To determine Standard Deviation for the data of Goats poulation and Sheep
population collected from 50 different houses.

Houses Live stock population


Goats Sheep Standard Deviation
H1 31 35 Goats Sheep
H2 44 12 11.80551 17.00834
H3 13 32
H4 36 56
H5 13 43
H6 42 27
H7 24 25
H8 31 6
H9 45 31
H10 49 57
H11 41 53
H12 37 40
H13 33 60
H14 5 58
H15 40 45
H16 50 50
H17 31 57
H18 11 27
H19 16 58
H20 37 26
H21 29 35
H22 5 16
H23 34 56
H24 22 22
H25 18 57
H26 30 16
H27 39 42
H28 35 14
H29 25 5
H30 25 23
H31 8 46
H32 33 24
H33 36 8
H34 32 22
H35 34 40
H36 26 10
H37 43 13
H38 5 54
H39 45 42
H40 27 27
H41 29 58
H42 26 39
H43 23 13
H44 26 53
H45 28 46
H46 23 37
H47 12 36
H48 39 58
H49 13 14
H50 16 55
Experiment No 17
Collect the data of two wheeler (with a rider and a pillion) crossing a busy junction in
your locality in the peak hours and determine the variance of the data in Microsoft excel
spread sheet and brief your inference with less than 30 words.
Aim: To Collect the data of two wheeler (with a rider and a pillion) crossing a busy junction in the peak
hours and to determine the variance of the data in Microsoft excel spread sheet
Procedure:
1. Open MS excel sheet and Type ‘ Junction name ‘ in first column , ‘No of two wheelers crossing the
junction’ in second column.
2. Under “Junction name” column type “Junction1” and “Junction2” drag it up to Junction50.
3. Generate randomly ‘No of two wheelers crossing the junction’ using “ RANDBETWEEN” formula by
taking limits 100 to 500 “ =RANDBETWEEN(100,500)” in a separate column.
4. Copy these values and paste as values in the ‘No of two wheelers crossing the junction’.
5. Then find the “variance” using the formula “= variance(select all the data values of ‘No of two
wheelers crossing the junction’)
6. If “Enter” key is pressed, variance value get displayed.
Output: The variance value for the given data is determined.
Experiment No 17(Output)

Experiment No 17
To Collect the data of two wheeler (with a rider and a pillion) crossing a busy junction in the peak hours and
to determine the variance of the data in Microsoft excel spread sheet

Place : Bangalore
Time : 5.00 pm To 6.00 pm

Junction name No of two wheelers


Crossing the junction
Junction 1 312 Variance 8091.677
Junction2 283
Junction 3 313
Junction 4 329
Junction 5 276
Junction 6 394
Junction 7 295
Junction 8 147
Junction 9 156
Junction 10 156
Junction 11 387
Junction 12 239
Junction 13 351
Junction 14 223
Junction 15 179
Junction 16 371
Junction 17 125
Junction 18 359
Junction 19 173
Junction 20 348
Junction 21 199
Junction 22 390
Junction 23 154
Junction 24 231
Junction 25 195
Junction 26 372
Junction 27 462
Junction 28 274
Junction 29 202
Junction 30 286
Experiment No 18
Using Microsoft Excel spread sheet draw a Skewness graph and kurtosis graph for
randomly generated dataset.
Aim: To draw a Skewness graph and kurtosis graph for randomly generated dataset using MS Excel
spread sheet.

Procedure:
1. Open MS excel sheet and Type ‘ Sl no ‘ in first column , ‘Data values’ in second column.
2. Under “Sl no ” column type “1” and “2” drag it up to 50.
3. Generate randomly “Data values” using “ RANDBETWEEN” formula by taking limits 1 to 100
“ =RANDBETWEEN(1,100)” in a separate column.
4. Copy these values and paste as values in the ‘Data values ’column.
5. Click “Data” -> Data analysis ->Select “ Descriptive statistics” -> Click OK
6. Click “input range” -> select all values -> Tick “ summary statistics” -Click “OK”. Then the required
values get displayed.
Output : Mean, Median , Mode, Skewness, Kurtosis and other values are determined for the given data
set.
Experiment No 18(Output)
Experiment No 18
Using Microsoft Excel spread sheet draw a Skewness graph and kurtosis graph for randomly generated dataset.

Sl no Data values
1 68
2 89
3 53
4 54
5 7
6 35 68
7 60
8 8 Mean 42.95918
9 11 Standard Error 3.562245
10 19 Median 47
11 45 Mode 54
12 52 Standard Deviation 24.93572
13 29 Sample Variance 621.79
14 74 Kurtosis -0.72516
15 93 Skewness 0.161283
16 54 Range 91
17 94 Minimum 3
18 22 Maximum 94
19 26 Sum 2105
20 47 Count 49
21 52
22 47
23 36
24 76
25 14
26 60
27 32
28 54
29 53
30 22
31 4
32 36
33 59
34 3
35 38
36 52
37 69
38 42
39 12
40 33
41 62
42 48
43 70
44 14
45 17
46 62
47 17
48 86
49 60
50 3
PYTHON
Python program execution procedure
Step 1 :- Start -> “All Programs”-> Python3.10-> IDLE Python (3.10 64 bit)

Step 2:- The IDLE shell 3.10.5 window will open as shown below

Step 3 :- Click “File”-> New File-> A new untitled window will open.

Step 4 :- Type the program code in editor window as shown below.

Step 5 :- Click “File”-> save -> give the File name -> save. Then Click “Run”-> “Run module”.

Step 6 :- The result get displayed in IDLE shell 3.10.5 window as shown below .
Experiment No 19
Write a python program to convert Decimal to Binary , octal and Hexadecimal.

Aim : To write a python program to convert Decimal (Ex: 25) to Binary, Octal, and Hexadecimal.

Procedure :

1 . Open “New file” in “Python IDLE shell 3.10.5” and write the following python program code.

dec=25
b=bin(25)
o=oct(25)
h=hex(25)
print("decimal number is:",dec)
print("binary value is:",b)
print("octal value is: ",o)
print("hexadecimal value is: ",h)

2 . Click on “ File” and save the Program.


3 . Then Click on “Run”-> “Run module”-> OK
4 . Then the result get displayed in IDLE shell 3.10.5 window as shown

Out put:
decimal number is: 25
binary value is: 0b11001
octal value is: 0o31
hexadecimal value is: 0x19
Experiment No 20
Write a python program to add 2 integers and 2 strings and print the result.

Aim : To write a python program to add 2 integers (Ex ; 200 and 800) and 2 strings (Govt Polytechnic,
Gauribidanur) and print the result

Procedure :

1 . Open “New file” in “Python IDLE shell 3.10.5” and write the following python program code.

num1= int(input("enter first integer number:"))


num2= int(input("enter second integer number:"))
sum= num1 + num2
print("Addition of 2 integer number is:",sum)

str1=str(input("Enter first string:"))


str2=str(input("Enter second string:"))
str3=str1+str2
print("Addition of 2 strings is:",str3)

2 . Click on “ File” and save the Program.


3 . Then Click on “Run”-> “Run module”-> OK
4 . Then the result get displayed in IDLE shell 3.10.5 window as shown

Out put:

enter first integer number:25


enter second integer number:75
Addition of 2 integer number is: 100
Enter first string:Government Polytechnic
Enter second string:Gauribidanur
Addition of 2 strings is: Government Polytechnic Gauribidanur
Experiment No 21
Write a python program to find the sum of first 10 natural numbers
Aim : To write a python program to find the sum of first 10 natural numbers .
Procedure :

1 . Open “New file” in “Python IDLE shell 3.10.5” and write the following python program code.

n=int(input("Enter a number:"))
sum1=0
while(n>0):
sum1=sum1+n
n=n-1
print("The sum of first n natural numbers is",sum1)

2 . Click on “ File” and save the Program.


3 . Then Click on “Run”-> “Run module”-> OK
4 . Then the result get displayed in IDLE shell 3.10.5 window as shown

Out put:

The sum of first 10 natural numbers is 55

Result : Python program to find the sum of first 10 natural numbers was executed.
Experiment No 22
Write a python program to find whether the number is odd or even.
Aim : To write a python program to find whether the number is odd or even.
Procedure :

1 . Open “New file” in “Python IDLE shell 3.10.5” and write the following python program code.

n=int(input("Enter any number:"))


if (n/2)==0:
print(n,"is an even number")
else:
print(n,"is an odd number")

2 . Click on “ File” and save the Program.


3 . Then Click on “Run”-> “Run module”-> OK
4 . Then the result get displayed in IDLE shell 3.10.5 window as shown

Out put:
Enter any number:55
55 is an odd number
Result : Python program to find whether the number is odd or even was executed.
Experiment No 23
Write a python program to find the variance and standard deviation for the given data.
Aim : To write a python program to find the variance and standard deviation for the given data.
Procedure :

1 . Open “New file” in “Python IDLE shell 3.10.5” and write the following python program code.

import statistics
data = [486,148,565,122,534]
var = statistics.pvariance(data)
print("The variance is :",var)
sd = statistics.pstdev(data)
print("The standard deviation is: ", sd)

2 . Click on “ File” and save the Program.


3 . Then Click on “Run”-> “Run module”-> OK
4 . Then the result get displayed in IDLE shell 3.10.5 window as shown

Out put:
The variance is : 37832
The standard deviation is: 194.50449866262733

Result : Python program to find the variance and standard deviation for the given data was executed.
Experiment No 24

Write a python program to display student marks from the record.


Aim : To write a python program to display student marks from the record.
Procedure :
1 . Open “New file” in “Python IDLE shell 3.10.5” and write the following python program code.
S1=int(input("student marks in kannada:"))
S2=int(input("student marks in English:"))
S3=int(input("student marks in Hindi:"))
S4=int(input("student marks in Mathematics:"))
S5=int(input("student marks in Science:"))
S6=int(input("student marks in Social science:"))
print("marks in kannada=",S1)
print("marks in English=",S2)
print("marks in Hindi=",S3)
print("marks in Mathematics=",S4)
print("marks in Science=",S5)
print("marks in Social science=",S6)
Total= S1+S2+S3+S4+S5+S6
print("Total=",Total)
P=(Total*100)/600
print("percentage=",P)
2 . Click on “ File” and save the Program.
3 . Then Click on “Run”-> “Run module”-> OK
4 . Then the result get displayed in IDLE shell 3.10.5 window as shown
Output: student marks in kannada:89
student marks in English:95
student marks in Hindi:98
student marks in Mathematics:99
student marks in Science:98
student marks in Social science:95
marks in kannada= 89
marks in English= 95
marks in Hindi= 98
marks in Mathematics= 99
marks in Science= 98
marks in Social science= 95
Total= 574
percentage= 95.66666666666667

Result : Python program to display student marks from the record was executed.
UNIT 1 STATISTICAL DATA COLLECTION AND TYPES
1. Define statistics.
Statistics is the science of collecting, presenting, analyzing, and interpreting the data , as
well as of making decisions based on such analysis.

2. Define sample.
Sample is a collection of elements from the population that represents the
characteristics of the population.

3. Define data .
A collection of facts such as numbers , words, measurements, observations,
description of things is called data.

4. Mention the different types of data .


Data can be classified in to two types.
1. Primary data : There are two types of Primary data
a) Qualitative data: Further there are two types of qualitative data
i) Nominal data
ii) Ordinal data
b) Quantitative data: Further there are two types of Quantitative data
i) Discrete data
ii) Continuous data
2. Secondary data

5. what are primary and secondary data ? Give examples.


Primary data is information collected through original or first-hand research.
Ex : surveys and focus group discussions.
secondary data is information which has been collected in the past by someone else
Ex : Government publications , public records , Historical and statistical documents , Business
documents , Technical and trade journals

6. What is a qualitative data ? Mention the different types of qualitative data.


Qualitative data is descriptive data that can not be expressed numerically. It does not involve any
mathematical calculations. It is It is also known as categorical data.
There are two types of qualitative data. 1. Nominal data
2. Ordinal data
7. What is nominal data ? Give examples.
Nominal data is defined as data that is used for naming or labelling variables, without any
quantitative value. These data are usually represented using the pie charts.
Ex : Letters, symbols, words, gender etc.
Examples: 1.Gender: Male, Female, Other.
2. Hair Color: Brown, Black, Blonde, Red, Other.
8. What is ordinal data ? Give examples.
Ordinal data is a type of categorical data with an order. The variables in ordinal data are
listed in an ordered manner. These data are usually represented using a bar chart.
Ex : a. Health – (“ Poor”, “reasonable”,” good or excellent”).
b. socio economic status- (“low income”,”middle income”,”high income”),
c. education level- (“high school”,”BS”,”MS”,”PhD”),
d. income level- (“less than 50K”, “50K-100K”, “over 100K”),
e. satisfaction rating (“extremely dislike”, “dislike”, “neutral”, “like”, “extremely like”).

9. What is a Quantitative data? Mention the different types of quantitative data .


Quantitative data is data that can be counted or measured in numerical values. Height in feet, age
in years, and weight in pounds are examples of quantitative data
There are two types of quantitative data. 1. Discrete data
2. Continuous data
10. What is Discrete data ? Give examples
Discrete data can take only discrete values. Discrete information contains only a finite number of
possible values. It is countable( things can be counted in whole numbers It is usually represented by
Bargraph.
Ex : 1. Number of students in the school,
2. Number of cars in the parking lot,
3. Number of computers in a computer lab, etc.
11. What is Continuous data ?
Continuous data is data that can be calculated. It is measurable. It can take any value in some
interval. It is usually represented by Histogram.
Ex : 1. Age, height or weight of a person,
2. Time taken to complete a task,
3. Temperature, time, money, etc.

12. Define data collection .


Data collection is a process of gathering information from all the relevant sources to find a solution
to the research problem.

13. Mention the important data collection tools.

The important data collection tools are


a) Questionnaires
b) Interviews
c) Survey
d) Focus group discussion
e) Observations
f) Documents and Records.

14. What is a questionnaire ? what are the different types of questionnaire?


A questionnaire is a list of questions used to collect data about someone or something.
There are two types of questionnaire
3. Closed ended questionnaire
4. Open ended questionnaire

15. What are the essentials of a good questionnaire ?


Following are the essentials of a good questionnaire.
1. Limited number of questions: The number of questions should be limited as far as possible. Normally 15 to 20
questions are sufficient enough for making the required enquiry.
2. Simplicity: The language of the question should be simple and easily understandable.
3. Logically arrange: The question should be arranged logically.
4. Related to the points: Questions should be related to the point. They should not be irrelevant.
5. Avoiding personal questions: Personal questions should be avoided as far as possible. For example, questions about
Income, volume of sales, etc. should not be asked.
16. What are closed ended questions ? Give examples .
Closed-ended questions can be answered with “Yes” or “No,” or they have a limited set of possible
answers
Ex : a. Are you feeling better today?
b. May I use your pen?
c. Will you please do me a favor?
d.. Have you already completed your homework?
e..Is that your final answer?
17. What are open ended questions ? Give Examples .
An open-ended questions are questions that cannot be answered with a "yes" or "no" response.
Open-ended questions are broad and can be answered in detail
Ex : a. Tell me about your college
b. How do you see your future?
c. What is the purpose of Government ?
d. Why did you choose that answer ?
e. Tell me about your friends in this paragraph .
18. What is a survey ?
A survey is a method of gathering information using relevant questions from a sample of people with the
aim of understanding populations as a whole.
19. Mention any five advantages of Survey.
Following are the imp advantages of survey.
• Relatively easy to administer
• Can be developed in less time (compared to other data-collection methods)
• Cost-effective, but cost depends on survey mode
• Capable of collecting data from a large number of respondents
• Numerous questions can be asked about a subject, giving extensive flexibility in data analysis
20. Mention any five disadvantages of survey.
Following are the imp disadvantages of survey
• Respondents may not feel encouraged to provide accurate, honest answers
• Respondents may not feel comfortable providing answers that present themselves in a unfavorable
manner.
• Respondents may not be fully aware of their reasons for any given answer because of lack of memory on
the subject
• Data errors due to question non-responses may exist.
• Survey question answer options could lead to unclear data because certain answer options may be
interpreted differently by respondents.
21. What is an interview ? Explain the different types of interviews ?
An interview is a face to face conversation where one participant asks questions, and the other provides
answers. The word "interview" refers to a one-on-one conversation between an interviewer and an
interviewee.
There are 3 types of interviews.
a) Structured interviews: The questions are predetermined in both topic and order.
b) Semi-structured interviews: A few questions are predetermined, but other questions aren't planned.
c) Unstructured interviews: None of the questions are predetermined.
22. What are the advantages of interviews?
Following are the imp advantages of interview.
a) Ability to find the right candidate
b) Enables detailed assessment
c) Great source of information
d) Increase knowledge
23. What is group discussion (focus group discussion)?
A focus group discussion involves gathering people from similar backgrounds together to discuss a
specific topic of interest. This research involves asking open-ended questions to a group of individuals
usually ranging from 6- 10 people, to provide feedback.
24. What is data cleaning ?
Data cleaning is the process of identifying and fixing incorrect data. It can be in incorrect format,
duplicates, corrupt, inaccurate, incomplete, or irrelevant. Various fixes can be made to the data values
representing incorrectness in the data.
25. Mention the benefits of data cleaning .
The imp benefits of data cleaning are
a) Avoiding mistakes
b) Improving productivity
c) Avoiding unnecessary costs and errors
d) Staying organized
e) Improved mapping
f) Saving time
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
UNIT 2 : SUMMARIZATION OF DATA
1. Define statistics or Data summarization
The collection , presentation, analysis, organization, and interpretation of data is known as Statistics
or Data summarization

2. Define population in statistics.


A population is the group of people from which a statistical sample is taken in statistics.

3. Define sample in statistics.


A sample is a representative group of a population chosen at random. It is a smaller subset selected
from the population and possesses all of its traits.

4. Mention the different types of Statistics.


There are two types of statistics .
i) Descriptive statistics
ii) Inferential statistics.

5. Define Descriptive statistics.


Statistics used to summarize a set of data is called Descriptive statistics. Sample data is summarized
using charts, tables, and graphs.

6. Define inferential statistics.


Statistics used to draw conclusions (or infer) about a population based on a sample of data that was
collected from the population is called Inferential statistics.

7. What is Ungrouped data ?


Data that is gathered for the first time during a study or experiment is called Ungrouped data.

8. What is Grouped data ?


Data that is grouped together in different categories ( classes or bins ) is called Grouped data.

9. Define frequency in statistics.


In statistics, frequency of an event is defined as the number of times the observation
occurred in an experiment or study.

10. What is frequency distribution table ?


A frequency distribution is a table that shows “classes” or “intervals” of data entries with a count of
the number of entries in each class.

11. Mention the types of Frequency distribution table.


The different types of Frequency distribution table are
i. Grouped frequency distribution.
ii. Ungrouped frequency distribution.
iii. Cumulative frequency distribution.
iv. Relative frequency distribution.
v. Relative cumulative frequency distribution.
12. Mention the basic rules for constructing frequency distribution table for less number of observations.
Following are the basic rules for constructing a frequency distribution table for less number of
observations.
i. First write the categories in one column
ii. Tally the numbers in each column
iii. Add up the number of tally marks in each row and record them in frequency column.

13. Define Class interval in statistics.


A class interval can be defined as the difference between the upper and lower class limit of a
frequency distribution table. In other words, it is the width of each class.

14. Mention the basic rules for constructing frequency distribution table for large number of observations .
Following are the basic rules for constructing a frequency distribution table for large number of
observations.
i. Find the lowest and highest values of the variables.
ii. Decide the width of class intervals
iii. Count all the possible values of the variables in that class interval.

15. What is relative frequency table ?


Relative frequency shows the percentage of observations in each range. The distribution table
Showing relative frequency is called relative frequency distribution table.

16. Mention the steps of enabling “ Analysis tool pack “ in Excel for windows.
1. Click the File tab, click Options, and then click the Add-Ins category.
2. In the Manage box, select Excel Add-ins and then click Go.
3. In the Add-Ins box, check the Analysis ToolPak check box, and then click OK.
a. If Analysis ToolPak is not listed in the Add-Ins available box, click Browse to locate it.
b. If you are prompted that the Analysis ToolPak is not currently installed on your computer,
click Yes to install it.

17. What is graphical representation?


Graphical representation is a form of visually displaying data through various methods like graphs,
diagrams, charts, and plots.

18. Mention the uses of graphical representation?


The advantages of using graphs are listed below:
1. The graph helps us to understand the data or information even when we have no
idea about it.
2. It saves time.
3. It makes it easier for us to compare the data for different kinds.
4. It helps to determine the mean, median and mode for different data
5. It is helpful for less literate audience

19. Mention the different types of graphs that are used to summarize and organize data.
Types of Graphical Representation
1. Line graph
2. Bar graph
3. Pie chart
4. Histogram
5. Frequency polygon
6. Box Plot
20. Define the following
a) Bar graph b) Pie chart c) Line graph d) Histogram d) Frequency polygon e) Box plot
f) Leaf stem plot.

a) Bar graph : A Bar graph is a graph that represents the categorical data using rectangular bars. There are
two types of Bar graphs.
i. Horizontal Bar graph
ii. Vertical Bar graph

b) Pie chart : A pie chart is a type of graph that represents the data in the circular graph. The slices of pie
show the relative size of the data.

c) Line graph : A line graph is a graph that uses lines to connect individual data points. A line graph displays
quantitative values over a specified time interval.

d) Histogram : A histogram is a graphical representation of data in a grouped frequency distribution with


continuous classes. They resemble bar graphs, but there are no gaps between the consecutive rectangles.

e) Frequency polygon : A frequency polygon is defined as a line graph created by joining all of the top points
of a histogram.

f) Box plot : A box and whisker plot (Box plot ) displays the five-number summary of a set of data. The five-
number summary is the minimum, first quartile, median, third quartile, and maximum.

g) Leaf stem plot : A stem and leaf plot is a unique table where values of data are split into a stem and leaf.
The first digit or digits will be written in stem and the last digit will be written in leaf.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
UNIT 3 : MEASURE OF LOCATION AND DISPERSION

1. What is Central Tendency?


The central tendency measure is defined as the number used to represent the center or middle of
a set of data values.

2. Mention three main measures of Central tendencies.


The 3 most common measures of central tendency are the mode, median, and mean

3. Define Mean. Write it’s Excel formula.


Mean is the average value of the given numbers and is calculated by dividing the sum of given
numbers by the total number of numbers.
To find the mean in Excel, we use the formula “ =AVERAGE(array of numbers)”

4. Define Median. Write it’s Excel formula.


Median can be defined as the middle value of a group of numbers.
To find median in Excel, we use the formula “=MEDIAN (number1, [number2], …)”

5. Define Mode. Write it’s Excel formula.


A mode is defined as the value that has a higher frequency in a given set of values. It is the value
that appears the most number of times.
To find mode in Excel , we usethe formula “=MODE(number1, [number2], …)”

6. Define statistical dispersion.


In statistics, the extent to which the numerical data are distributed or squeezed about an average
value is called statistical dispersion. In short, it is the distribution of data.

7. Name the different types of measures of Statistical Dispersion.


There are two types of measures of statistical dispersion.
1. Absolute measures of dispersion.
2. Relative measures of dispersion.

8. Mention the different Absolute measures of Dispersion for the given data.
The different types of Absolute measures of dispersion are
i) Range
ii) Variance
iii) Quartile deviation
iv) Mean Deviation
v) Standard Deviation

9. Mention the different Relative measures of Dispersion for the given data
The different types of Relative measures of dispersion are
i) Coefficient of Range
ii) Coefficient of variation
iii) Coefficient of Mean deviation
iv) Coefficient of Quartile deviation
10. Define the following with Excel formula.
a) Range b) Quartile c) Quartile deviation. d) Variance e) Standard Deviation.

a) Range : It is the difference between the maximum value and the minimum value given in a data
set.
Range = Maximum value – minimum value.
b) Quartile : Quartile refers to the values which divide the set into quarters.
c) Quartile deviation : It is half of the difference between First and Third quartile ((Q3-Q1)/2).
d) Variance: It gives us the info about how far the data is spread from its mean.
e) Standard deviation : In statistics, the standard deviation is a measure of the amount of variation or
dispersion of a set of values.

A low standard deviation indicates that the values tend to be close to the mean (also called
the expected value) of the set, while a high standard deviation indicates that the values are spread
out over a wider range.

11. Explain skewness and kurtosis graphs in MS Excel.

skewness as a measure of symmetry. If the skewness of S is zero then the distribution


represented by S is perfectly symmetric. If the skewness is negative, then the distribution is skewed to
the left, while if the skew is positive then the distribution is skewed to the right

Kurtosis in statistics describes the distribution of the data set. It shows to what extent the data
set points of a particular distribution differ from the data of a normal distribution. It is also used to
determine whether a distribution contains extreme values.
There are 3 types of Kurtosis.
1. Mesokurtic
2. Leptokurtic
3. Platykurtic

If the Kurtosis of data falls close to zero or equals zero, it is referred to as Mesokurtic. It
means that the data set follows a normal distribution
If the Kurtosis of data falls more than zero (kurtosis + ve), it is referred to as leptokurtic.
Leptokurtic has steep curves on both sides, indicating the large population of outliers in the data set.
If the Kurtosis of data falls less than zero (kurtosis - ve), it is referred to as Platykurtic.
Platykurtic has pale or flat curve, and that curve indicates the small number of outliers in a distribution.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
UNIT 4 : INTRODUCTION TO PYTHON PROGRAMMING

1. What is Programming ?
Programming refers to a technological process for telling a computer which tasks to perform in order to
solve problems.

2. What is Python ?
Python is a high-level, general-purpose programming language.

3. Who invented Python Programme?


Python was created by Guido van Rossum, and first released on February 20, 1991.

4. Mention the advantages of learning Python.


Advantages of Python are

1. Easy to Read, Learn and Write: Python is a high-level programming language that has English-like
syntax. This makes it easier to read and understand the code.
2. Improved Productivity : Python is a very productive language. Due to the simplicity of Python,
developers can focus on solving the problem. They don’t need to spend too much time in
understanding the syntax or behavior of the programming language. You write less code and get
more things done.
3. Interpreted Language : Python is an interpreted language which means that Python
directly executes
the code line by line. In case of any error, it stops further execution and reports back the error
which has occurred. Python shows only one error even if the program has multiple errors. This
makes debugging easier.
4. Dynamically Typed : Python doesn’t know the type of variable until we run the code. It
automatically
assigns the data type during execution. The programmer doesn’t need to worry about declaring
variables and their data types.
5. Free and Open-Source : Python comes under the OSI approved open-source license. This makes
it free to use and distribute. You can download the source code, modify it and even distribute
your version of Python. This is useful for organizations that want to modify some specific behavior
and use their version for development.
6. Vast Libraries Support : The standard library of Python is huge, you can find almost all the functions
needed for your task. So, you don’t have to depend on external libraries.But even if you do,
a Python package manager (pip) makes things easier to import other great packages from
the Python package index (PyPi). It consists of over 200,000 packages.
7. Portability : In many languages like C/C++, you need to change your code to run the program on
different platforms. That is not the same with Python. You only write once and run it anywhere.

5. Mention the steps of Python installation.


Step 1 : Open a web browser and go to https://www.python.org/downloads/.
Step 2 : Download the latest version of python for windows 10 (Ex :3.10.5(64 bit))
Step 3 : Run the .exe file that you just downloaded.
Step 4 : Install Python 3.10.5(64 bit) by clicking on Install now
6. What are Python Libraries?
Normally, a library is a collection of books or is a room or place where many books are stored to be
used later. Similarly a Python library is simply a collection of codes or modules of codes that we can use
in a program for specific operations. We use libraries so that we don’t need to write the code again in
our program that is already available.

7. Mention the packages/Libraries for Python.


The commonly used Python libraries are
1. TensorFlow: This library was developed by Google in collaboration with the Brain Team. It is an open-
source library used for high-level computations. It is also used in machine learning and deep learning
algorithms. It contains a large number of tensor operations. Researchers also use this Python library
to solve complex computations in Mathematics and Physics.
2. Matplotlib: This library is responsible for plotting numerical data. And that’s why it is used in data
analysis. It is also an open-source library and plots high-defined figures like pie charts, histograms,
scatterplots, graphs, etc.
3. Pandas: Pandas are an important library for data scientists. It is an open-source machine learning
library that provides flexible high-level data structures and a variety of analysis tools. It eases data
analysis, data manipulation, and cleaning of data. Pandas support operations like Sorting, Re-
indexing, Iteration, Concatenation, Conversion of data, Visualizations, Aggregations, etc.
4. NumPy: The name “Numpy” stands for “Numerical Python”. It is the commonly used library. It is a
popular machine learning library that supports large matrices and multi-dimensional data. It consists
of in-built mathematical functions for easy computations. Even libraries like TensorFlow use Numpy
internally to perform several operations on tensors. Array Interface is one of the key features of this
library.
5. SciPy: The name “SciPy” stands for “Scientific Python”. It is an open-source library used for high-level
scientific computations. This library is built over an extension of Numpy. It works with Numpy to
handle complex computations. While Numpy allows sorting and indexing of array data, the numerical
data code is stored in SciPy. It is also widely used by application developers and engineers.
6. ScraPy: It is an open-source library that is used for extracting data from websites. It provides very
fast web crawling and high-level screen scraping. It can also be used for data mining and automated
testing of data.
7. Scikit-learn: It is a famous Python library to work with complex data. Scikit-learn is an open-source
library that supports machine learning. It supports variously supervised and unsupervised algorithms
like linear regression, classification, clustering, etc. This library works in association with Numpy and
SciPy.
8. PyGame: This library provides an easy interface to the Standard Directmedia Library (SDL) platform-
independent graphics, audio, and input libraries. It is used for developing video games using
computer graphics and audio libraries along with Python programming language.
9. PyTorch: PyTorch is the largest machine learning library that optimizes tensor computations. It has
rich APIs to perform tensor computations with strong GPU acceleration. It also helps to solve
application issues related to neural networks.
10. PyBrain: The name “PyBrain” stands for Python Based Reinforcement Learning, Artificial Intelligence,
and Neural Networks library. It is an open-source library built for beginners in the field of Machine
Learning. It provides fast and easy-to-use algorithms for machine learning tasks. It is so flexible and
easily understandable and that’s why is really helpful for developers that are new in research fields.

8. What is Anaconda in python ?


Anaconda Python is a free, open-source platform that helps to write and execute code in the
programming language Python. It is popular for data analysis and scientific computing. It comes with
many preinstalled libraries which include NumPy, SciPy, Matplotlib, Pandas, Cython, Spyder and Jupyter.
9. How do you execute Python Syntax?
Python syntax can be executed by writing directly in the Command Line:

>>> print("Hello, World!")


Hello, World!

10. How do you start Python in Windows?


Step 1 :- Start -> “All Programs”-> Python3.10-> IDLE Python (3.10 64 bit)
Step 2:- The IDLE shell 3.10.5 window will open
Step 3 :- Click “File”-> New File-> A new untitled window will open.
Step 4 :- Type the program code in editor window
Step 5 :- Click “File”-> save -> give the File name -> save. Then Click “Run”-> “Run module”.
Step 6 :- The result get displayed in IDLE shell 3.10.5 window .

11. What is Indentation in Python ?


Leading white space (spaces and tabs) at the beginning of a statement is called Indentation. Python
uses Indentation to indicate a block of code.
Ex:
if a==1:( BLOCK 1)
print(a)( BLOCK 2)
if b==2:( BLOCK 3)
print(b)( BLOCK 2 (continuation))
print("end")( BLOCK 1 (continuation)

12. Mention the different quotation used in Python? Give Examples.


Python accepts single quotes( ‘ ) , double quotes( “ ) and triple ( ‘’’ or “ “ “ )to represent a
string in Python.

➢ Single quotes are used for single word


Ex : GPT= ‘Gauribidanur ’
➢ Double quotes are used for sentences
Ex : GPT = “ Government Polytechnic Gauribidanur”
➢ Triple quotes are used to represent a multi-line string.
Ex : GPT = “ “ “Government Polytechnic Gauribidanur is a technical institute
under collegiate and technical education ” ” ”

13. How do the comments in Python starts?


Comments in Python begin with a hash mark (#) and whitespace character and continue to the
end of the line. Python ignores everything after the hash mark and up to the end of the line. It can be
inserted anywhere in your code, even in line with other code.
Ex : 1. # This is a comment
2. print("This will run.") # This won't run

14. What is a variable in Python?


A Python variable is a reserved memory location to store values. In other words, a variable in a
python program gives data to the computer for processing.

15. Mention the rules for Python variables.


1. A Variable name should start with letter (a-z , A-Z) or underscore (_).
EX : age , _age , Age
2. In variable name, no special characters allowed other than underscore (_).
3. Variables are case sensitive. (age, Age, AGE are three different variables.)
4. A Variable name can not start with a number.
5. Variable name should not be a Python keyword.
Ex : pass, break, continue.. etc are reserved for special meaning in Python. So, we should
not declare keyword as a variable name.

16. What are output variables in Python?


The Python print statement is often used to output variables. To combine both text and a variable,
Python uses the + character.
Ex : 1) x = "awesome"
print("Python is", x)

output : Python is awesome

17. Mention the different data types of Python.


Different data types in Python are Numbers, List, Tuple, Strings, Dictionary, etc.

18. Explain the following


a) Numbers in Python b) String in Python c) Python Lists d) Python Dictionary

a) Numbers in Python:
There are three numerical types in Python.
i) Int :- Int, or integer, is a whole number, positive or negative, without
decimals, of unlimited length.
Ex: x = 35656222554887711
ii) Float :- Float, or "floating point number" is a number, positive or negative,
containing one or more decimals. Ex : x = 1.10
iii) Complex :- Complex numbers are written with a+ib form where a is real part
and b is imaginary part .
b) String in Python : String is a collection of alphabets, words or other characters. It is one of
the primitive data structures and are the building blocks for data manipulation. Python has a
built-in string class named str . Strings in python are surrounded by either single quotation
marks, or double quotation marks.

c) ) Python Lists : A list in Python is used to store the sequence of various types of data. A
list can be defined as a collection of values or items of different types. The items in the list are
separated with the comma (,) and enclosed with the square brackets [].

d) Python Dictionary: A dictionary is a kind of data structure that stores items in key-value pairs.
A key is a unique identifier for an item, and a value is the data associated with that key.
Dictionaries often store information such as words and definitions, but they can be used for much
more. Dictionaries are mutable in Python, which means they can be changed after they are
created. They are also unordered, indicating the items in a dictionary are not stored in any
particular order.

19. Mention the different types of operators in Python.


The different types of operators in python are
1. Arithmetic operators
2. Comparison operators
3. Logical ( or Relational) operators
4. Assignment operators
5. Conditional ( or ternary ) operators
20. Write the arithmetic operators used in Python.
Arithmetic Operators in Python are of the following types-
1. Addition (+)
2. Subtraction ( - )
3. Multiplication ( * )
4. Division ( / )
5. Modulus ( % )
6. Exponent ( ** )
7. Floor Division ( // )

21. Write the comparison operators used in python .


Comparison operators in python are
1. Equal to( == )
2. Not equal to ( != )
3. Greater than ( > )
4. Less than ( < )
5. Greater than or equal to ( >= )
6. Less than or equal to ( <= )

22. Mention the different types of Loops in Python.


A loop is an instruction that repeats multiple times as long as some condition is met. The different types
of loops in Python are
1. While loop
2. For loop
3. Nested loop
The while loop is used to execute a set of statements as long as a condition is true.
The For loop in Python is used to iterate over a sequence
If a loop exists inside the body of another loop, it is called a nested loop.

23. What are Python arrays?


An array is a special variable, which can hold more than one value at a time. Arrays are used to store
multiple values in one single variable.

24. What is Python function?


A Python function is a reusable block of programming statements designed to perform a
certain task. To define a function, Python provides the ‘def ’ keyword.
The idea is to put some commonly or repeatedly done tasks together and make a function
so that instead of writing the same code again and again for different inputs, we can do the function
calls to reuse code contained in it over and over again.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy