Python Inheritance (Make Your Code Modular!) #22

  Рет қаралды 58,496

Programiz

Programiz

Күн бұрын

Пікірлер: 39
@programizstudios
@programizstudios 2 жыл бұрын
🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges. Try Programiz PRO: bit.ly/right-python
@serpentinefireball
@serpentinefireball 3 жыл бұрын
Just brilliant! I have understood everything as a complete beginner. Thank you!
@curiouscucumber7162
@curiouscucumber7162 3 жыл бұрын
Your videos are so underrated, have learnt complex topics like OOPS in a matter of few days. Thanks
@danielnelson8592
@danielnelson8592 4 жыл бұрын
Programiz is a good place to learn. Thanks a lot for your help
@nancyfazal2536
@nancyfazal2536 Жыл бұрын
Too good ! Please add lectures on Abstraction, Encapsulation and Polymorphism also.
@srikrishna546
@srikrishna546 3 жыл бұрын
Can you please continue this series it clears the doubts so much with such an ease. Thanks for the video and please please please upload more such videos
@jeevithaloknath9787
@jeevithaloknath9787 2 жыл бұрын
super explanation. Nothing was getting inside my mind before watching this. really wonderfull!!
@saiavinashduddupudi8975
@saiavinashduddupudi8975 3 жыл бұрын
Correction at 03:43 - It should be *Object of Dog Class* Not Animal class Because objects of the Animal class does not have access to attributes and methods of Dog Class.
@ziyah1735
@ziyah1735 4 жыл бұрын
Thanks for all your info truly amazing....Bless up and keep up the Great Work....
@piyushkurve457
@piyushkurve457 3 жыл бұрын
Please make videos on Multiple Inheritance and Operator overloading as well
@yordannedelchev8797
@yordannedelchev8797 Жыл бұрын
This is the first Indian guy that I actually enjoy listening.
@vedakunjir7916
@vedakunjir7916 2 жыл бұрын
Can you please continue the series sir ,its easy to understand the way you teach
@aidendouglas8672
@aidendouglas8672 2 жыл бұрын
Thank you! This was a very helpful video
@homerdarang2832
@homerdarang2832 3 жыл бұрын
I clearly understand the OOP here. Thanks dude.!
@kajalchandravanshi2456
@kajalchandravanshi2456 3 жыл бұрын
Respect your content 😊😊
@Rameshkumar-tn3wp
@Rameshkumar-tn3wp 3 жыл бұрын
Simple explanation , thanks...
@DessertWali
@DessertWali 3 жыл бұрын
Your explanation is really very good Please make all videos on Oops concept s
@kawaiikina3618
@kawaiikina3618 2 жыл бұрын
Happy Programming!😇
@sandipansarkar9211
@sandipansarkar9211 3 жыл бұрын
great explanation
@tamimadnan4482
@tamimadnan4482 3 жыл бұрын
class polygon(): def __init__(self, sides): self.sides = sides def display_info(self): print("the polygon is a two dimensional shape with straigt lines") def get_perimeter(self): perimeter = sum(self.sides) return perimeter class triangle(polygon): def display_info(self): print("the triangle is three sides of edges") class quadlilateral(polygon): def display_info(self): print("the quadlilateral is four sides of edges") t1 = triangle([3,4,5]) perimeter = t1.get_perimeter() print("The perimeter is", perimeter) here showed that the triangle has get_perimeter attributes, but I can't fix the error. Can u please help me?
@edmondallan466
@edmondallan466 2 жыл бұрын
you didnt give space known as indendation in the class polygon methods if you space in methods of the class polygon your program will correct
@OmarMohamed-it8ly
@OmarMohamed-it8ly 3 жыл бұрын
This helped me so much...thank you
@omkarpanda3906
@omkarpanda3906 4 жыл бұрын
waiting for abstraction and encapsulation #askprogrammiz
@vaishnavivr3204
@vaishnavivr3204 2 жыл бұрын
Can u please create one video about polymorphism, encapsulation and abstraction please...
@riyashrestha3483
@riyashrestha3483 4 жыл бұрын
Which text editor do you guys use?😀 #askprogramiz
@JohnWickXD
@JohnWickXD Жыл бұрын
Thanks alot;)
@surya691
@surya691 2 жыл бұрын
Should we have to give "object" to function name ?? Here dog1 for dog?
@shankarsai2067
@shankarsai2067 4 жыл бұрын
What is this class... when will u start Python modules??
@shalinigilani739
@shalinigilani739 2 жыл бұрын
what does argument (self) mean ?
@morin1997
@morin1997 3 жыл бұрын
Yeah, this is getting hard... :D
@Ynaxio
@Ynaxio 3 жыл бұрын
10:11 why comma and not dot??
@programizstudios
@programizstudios 3 жыл бұрын
We use comma in the print() function to print multiple objects. For example, print("Hello", "there") And, the . operator is used to access methods and attributes of an object. For example, my_list = [1, 2, 3] my_list.append(4) print(my_list)
@jafecc
@jafecc 3 ай бұрын
Always make sure that the spelling of every word must be correct.
@divyaahirkar9183
@divyaahirkar9183 3 жыл бұрын
IS THIS CODE RIGHT???? marks = int(input("enter your marks:")) number_of_subjects = int(input("enter no. of subjects:")) class marks_obtained(): def __init__(self,name,marks,number_of_subjects): self.name = name self.marks = marks self.number_of_subjects = number_of_subjects def percent_obtained(self): total = self.marks/self.number_of_subjects percentile = total*100 print("self.name has scurred :" ,percentile) return percentile def rank_securred(self): if percentile >=90: print("self.name has got an A ") elif 90 >percentile>=80: print("self.name has got B") else : print("self.name has got C") return rank class student_1(marks_obtained): pass c1 = student_1("Harry",marks,number_of_subjects) percentile = student_1.percent_obtained() rank = student_1.rank_securred()
@darkwolves03
@darkwolves03 Жыл бұрын
you dint pass the marks and number of subjects arguments
@mishrarenuka7505
@mishrarenuka7505 4 жыл бұрын
write a program to calculate the total amount payable by the customer on purchase of any item with GST lived on it develop a user friendly approach using while loop Bro iska source code bata do Ya phir kisi ko bhi ata ho toh bata do plz
@divyaahirkar9183
@divyaahirkar9183 3 жыл бұрын
HOPE THIS HELP!!! # write a program to calculate the total amount payable by the customer on purchase of any item with GST lived on it develop a user friendly approach using while loop class Amount_payable(): def __init__(self,name,cost_of_item): self.name = name self.cost_of_item = cost_of_item def total_amount(self): GST = 10.3 if self.cost_of_item > 1000: final_amount = self.cost_of_item + GST print(final_amount) else: print("its GST free") return pay class Customer(Amount_payable): pass c1 = Customer("janet", 50000) pay = c1.total_amount() print(pay) class Customer2(Amount_payable): pass c2 = Customer2("harry",100) pay = c2.total_amount() print(pay)
Use Python Modules (to Write Clean Code) #23
9:26
Programiz
Рет қаралды 71 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 46 МЛН
The Flaws of Inheritance
10:01
CodeAesthetic
Рет қаралды 976 М.
Avoid These BAD Practices in Python OOP
24:42
ArjanCodes
Рет қаралды 77 М.
7 Design Patterns EVERY Developer Should Know
23:09
ForrestKnight
Рет қаралды 78 М.
The Ultimate Guide to Writing Classes in Python
25:39
ArjanCodes
Рет қаралды 120 М.
Why You Should Think Twice Before Using Returns in Python
21:27
ArjanCodes
Рет қаралды 27 М.
Decorators in Python (Easy to Understand Guide) #31
15:23
Programiz
Рет қаралды 59 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 354 М.
Why Use Design Patterns When Python Has Functions?
23:23
ArjanCodes
Рет қаралды 111 М.
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Lists & Tuples in Python (How to Use Them Effectively?) #15
19:29
Players push long pins through a cardboard box attempting to pop the balloon!
00:31