Page 1 :
PRACTICAL FILE/STUDENT PORTFOLIO, FOR TERM – II, , Session: 2021 – 22, , Class: ______9th_________, , Submitted by, , Submitted to, Mr. Pradeep Kumar, Subject Teacher – AI
Page 3 :
Part – D, , PART - C, , Syllabus for AI Practical File, Class – 9th, Subject Specific Skills, , Practical Work, • Unit 4: Introduction to Python, , Marks, 20, , Practical Examination, Viva – Voce, , Total, Practical Work/Field Visit/ Practical File/Student Portfolio, , 10, 5, 35, 10, , Viva – Voce, , 5, Total, , GRAND TOTAL, , 15, , 50
Page 4 :
INDEX, S.No., , Assignment Name, , 1, , Print 5 lines about yourself using print() function., , 2, , Write a program to make a simple calculator., , 3, , Write a python program which can solve a quadratic equation, , 4, 5, 6, 7, 8, 9, 10, , Input the name, age and basic salary of an employee. Calculate, the total salary of an employee by adding 10% DA and 10%, HRA to the basic salary., Write a program to display “Valid Voter” if the following, condition is true: Age of the person should be >=18., A tours and travels company charges their customer as per, following criteria according to customer category., Write a program to implement an increment to the employees, based on their appraisal score., Write a program to make a game “Turtle Bet Game” by using, python script., Lock or unlock your phone using pin or password and, generate appropriate message., Write a short note about five essential plots that can help in, data visualisation., , Signature
Page 5 :
Date: _____________, , Assignment – 1, , Learning Outcome: Python Basics, Objective: Printing 5 lines., Task: Print 5 lines about yourself using print() function., Attach your code here, , Output, , Page No. _________
Page 6 :
Date: _____________, , Assignment – 2, , Page No. _________, , Learning Outcome: Python Basics, Objective: Simple Calculator., Task: Write a program to make a simple calculator., , Attach your code here, , Output
Page 7 :
Date: _____________, , Assignment – 3, , Page No. _________, , Learning Outcome: Python Basics, Objective: Quadratic formula., Task: Write a python program which can solve a quadratic equation., Formula: Let ax2 + bx + c = 0 is a quadratic equation where a, b and c are real and a ≠ 0, Then Quadratic formula is, , Attach your code here, , �=, , −� ±, , �2 − 2��, 2�, , Output
Page 8 :
Date: _____________, , Assignment – 4, , Page No. _________, , Learning Outcome: Python Arithmetic operators, Objective: Using functions input() operations., Task: Input the name, age and basic salary of an employee. Calculate the total salary of an, employee by adding 10% DA and 10% HRA to the basic salary., , Attach your code here, , Output
Page 9 :
Date: _____________, , Assignment – 5, , Page No. _________, , Learning Outcome: Python Arithmetic operators, Objective: Using functions input() operations., Task: Write a program to display “Valid Voter” if the following condition is true: Age of the, person should be >=18., , Attach your code here, , Output
Page 10 :
Date: _____________, , Page No. _________, , Assignment – 6, , Task: A tours and travels company charges their customer as per following criteria according, to customer category., Category, A, B, C, D, Others, , Attach your code here, , Charges, 18, 15, 12, 10, 20, , Output
Page 11 :
Date: _____________, , Assignment – 7, , Page No. _________, , Task: Write a program to implement an increment to the employees based on their appraisal, score., Appraisal Score, 0-10, 11-30, 31-50, 51-80, 81-100, , Attach your code here, , Rate of Increment, 3%, 5%, 8%, 10%, 15%, , Output
Page 12 :
Date: _____________, , Assignment – 8, , Page No. _________, , Task: Write a program to make a game “Turtle Bet Game” by using python script., Attach your code here, , Output
Page 13 :
Date: _____________, , Assignment – 9, , Page No. _________, , Objective: Use of if-else, Task: Lock or unlock your phone using pin or password and generate appropriate message., Procedure: Take a password as a combination of alphanumeric characters along with special, characters, and check whether the password is valid or not with the help of few conditions., Conditions for a valid password are:, 1. Should have at least one number., 2. Should have at least one uppercase and one lowercase character., 3. Should have at least one special symbol., 4. Should be between 6 to 20 characters long., , Attach your code here, , Output
Page 14 :
Date: _____________, , Assignment – 10, , Page No. _________, , Task: Write a short note about five essential plots that can help in data visualization., , Data visualization Tools, Introduction: Data visualization is the process of turning your data into graphical, representations that communicate logical relationships and lead to more informed, decision-making., In short, data visualization is the representation of data in a graphical or pictorial, format., There are five essential plots that have we need to know well for basic data visualization., , , , , , , Line Plot, Histogram Plot, Scatter Plot, Bar Chart, Box and Whisker Plot, , 1. Line Plot:, , , , , , , Input, , A line plot is used to show observations gathered at regular intervals., The x-axis shows the regular interval, such as time., The Y- axis shows the observations., A line plot can be built by the calling the plot() function and passing the X-axis data for, the regular interval, and Y – axis for the observations., # code to create a line plot, pyplot.plot(x, y), , Output
Page 15 :
2. Bar Plot:, A bar chart presents relative quantities for multiple categories., , The x-axis shows the categories that are spaced evenly., The Y- axis shows the quantity for each category and is drawn as a bar from the, baseline to the required level on the Y-axis., , A bar chart can be built by the calling the bar() function and passing the category, names for the X-axis and the quantities for the Y – axis., , Input, , Output, , 3. Histogram Plot:, Histogram plots are used for summarizing the distribution of a data sample., , The x-axis shows distinct bins or intervals for the observation.., The Y- axis shows the frequency or tally of the number of observations in the dataset, that has assigned to each bin., , A Histogram plot can be designed by the calling the hist() function and passing a list or, array that shows the data sample., # code to create a histogram plot, pyplot.hist(x, y)
Page 16 :
Input, , Output, , 4. Box and Whisker Plot:, Box and whisker plot (boxplot) is usually used for summarizing the distribution of a, data sample., , The x-axis shows the data sample, where multiple boxplots can be created beside one, another on the X-axis., , The Y- axis shows the observation values., A box is created to summarise the middle 50% of the data set, starting at the, , observation at the 25th percentile and concluding at the 75th percentile. This is known as, interquartile range (IQR)., , The median or the 50th percentile , is created with a line. Lines are called whisker are, , created by extending from both ends of the box calculated as (1.5×IQR) to demonstrate, the expected range of sensible values in the distribution., , Observations outside the whiskers might be outliers and are drawn with small circles., Boxplot can be created by the calling the boxplot() function and passing in the data, sample as an array or list., # code to create a box and whisker plot, pyplot.boxplot(x, y)
Page 17 :
Input, , Output, , 5. Scatter Plot:, Histogram plots usually summarises the relationship between two paired data sample., , The x-axis shows the observation value for the first sample., The Y- axis shows the observation value for the second sample. Each point on the plot, shows a single observation., , A scatter plot can be designed by the calling the scatter() function and passing a list or, array that shows the data sample., # code to create a scatter plot, pyplot. Scatter(x, y), , Input, , Output