From a1502f09bb5237126236d42a4969cfd649036e8a Mon Sep 17 00:00:00 2001 From: Asabeneh Date: Fri, 10 Jul 2020 09:36:18 +0300 Subject: [PATCH] Classes and Objects --- .../21_classes_and_objects.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) rename 21_Day/21_class_and_object.md => 21_Day_Classes_and_objects/21_classes_and_objects.md (95%) diff --git a/21_Day/21_class_and_object.md b/21_Day_Classes_and_objects/21_classes_and_objects.md similarity index 95% rename from 21_Day/21_class_and_object.md rename to 21_Day_Classes_and_objects/21_classes_and_objects.md index 89e9a80..9b536b5 100644 --- a/21_Day/21_class_and_object.md +++ b/21_Day_Classes_and_objects/21_classes_and_objects.md @@ -15,11 +15,11 @@ -[<< Day 20](../20_Day/20_python_package_manager.md) | [Day 22 >>](../22_Day/22_web_scraping.md) +[<< Day 20](../20_Day_Python_package_manager/20_python_package_manager.md) | [Day 22 >>](../22_Day_Web_scraping/22_web_scraping.md) ![30DaysOfPython](../images/30DaysOfPython_banner3@2x.png) -- [📘 Day 21](#%f0%9f%93%98-day-21) +- [📘 Day 21](#-day-21) - [Classes and Objects](#classes-and-objects) - [Creating a Class](#creating-a-class) - [Creating an Object](#creating-an-object) @@ -28,8 +28,8 @@ - [Object Default Methods](#object-default-methods) - [Method to Modify Class Default Values](#method-to-modify-class-default-values) - [Inheritance](#inheritance) - - [Overriding Parent Method](#overriding-parent-method) - - [💻 Exercises: Day 21](#%f0%9f%92%bb-exercises-day-21) + - [Overriding parent method](#overriding-parent-method) + - [💻 Exercises: Day 21](#-exercises-day-21) # 📘 Day 21 @@ -319,6 +319,8 @@ Lidiya Teklemariam is 28 years old. She lives in Espoo, Finland. We can use super() function or the parent name Person to automatically inherit the methods and properties from its parent. In the example above we override the parant method. The child method has a different feature, it can identify, if the gender is male or female and assign the proper pronoun(He/She). +🌕 Now, you are fully charged with a super power of programming. Now do some exercises for your brain and for your muscle. + ## 💻 Exercises: Day 21 1. Python has the module called _statistics_ and we can use this module to do all the statistical caluculations. However to challlenge ourselves, let's try to develop a program, which calculates the measure of central tendency of a sample (mean, median, mode) and measure of variability (range, variance, standard deviation). In addition to those measures, find the min, max, count, percentile, and frequency distribution of the sample. You can create a class called Statistics and create all the functions that do statistical calculations as methods for the Statistics class. Check the output below. @@ -360,4 +362,4 @@ Frequency Distribution: [(20.0, 26), (16.0, 27), (12.0, 32), (8.0, 37), (8.0, 34 🎉 CONGRATULATIONS ! 🎉 -[<< Day 20](../20_Day/20_python_package_manager.md) | [Day 22 >>](../22_Day/22_web_scraping.md) +[<< Day 20](../20_Day_Python_package_manager/20_python_package_manager.md) | [Day 22 >>](../22_Day_Web_scraping/22_web_scraping.md)