#54 Python Tutorial for Beginners | Inner class

June 7, 2020



Python Tutorial to learn Python programming with examples
Complete Python Tutorial for Beginners Playlist :
Python Tutorial in Hindi :

Github :-

Editing Monitors :

Check out our website:

Follow Telusko on Twitter:

Follow on Facebook:
Telusko :
Navin Reddy :

Follow Navin Reddy on Instagram:

Subscribe to our other channel:
Navin Reddy :
Telusko Hindi :

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20

Nguồn: https://altcommtechniques.com

Xem thêm bài viết khác: https://altcommtechniques.com/game/

All Comments

  • Great

    Sharavana Kumar June 7, 2020 7:33 pm Reply
  • Just awesome

    praveen kamble June 7, 2020 7:33 pm Reply
  • Sir could you explain how u take argument in Student , as Student is class not a method..

    Mandar Joshi June 7, 2020 7:33 pm Reply
  • Confusing

    Aks.munger June 7, 2020 7:33 pm Reply
  • I just wrote an code as it is but error occurred on line self.lap.show(). Here the error occurred so please help me guys 🙏

    Hruthik Shetty June 7, 2020 7:33 pm Reply
  • (Siddesh): Thank you sp much Navin.

    Tech Shower June 7, 2020 7:33 pm Reply
  • can we make two constructors as we do in other progg. lang. one constrict. take some argument and other constrict takes no argument??
    Please help

    Abhimanyu kumar June 7, 2020 7:33 pm Reply
  • Sir, When we create a object of inner class, OUTSIDE outer class and keep some changes in its variable by this object. Then after accessing that variable by the object of inner class created INSIDE outer class, it can not changes its variable's value…… Why??

    Hey, Its really funny June 7, 2020 7:33 pm Reply
  • How to change student two laptop information ?? Please anyone can help

    Srujana pavan Patwari June 7, 2020 7:33 pm Reply
  • It would be better if you have added any exercise at the end of the video

    mounika gajula June 7, 2020 7:33 pm Reply
  • sir ur tuts are love.. in this lockdown

    pushpa tayal June 7, 2020 7:33 pm Reply
  • Sir, the concept didn't get clear. Still have many doubts. Could you please add one more video for the inner class. plzz

    Nidhisha Shetty June 7, 2020 7:33 pm Reply
  • If you want a different example of inner class; here it is
    class geometry:

    def __init__(self):

    self.rectangle = self.rectangle()

    self.triangle = self.triangle()

    class rectangle:

    def __init__(self):

    self.l = int(input("Enter length:"))

    self.b = int(input("Enter breadth:"))

    def show(self):

    area = self.l * self.b

    print("The area of rectangle is:",area)

    class triangle:

    def __init__(self):

    self.h = int(input("Enter height:"))

    self.b = int(input("Enter base:"))

    def show(self):

    area = 0.5 * self.b * self.h

    print("The area of triangle is:",area)

    r1 = geometry.rectangle()

    r1.show()

    t1 = geometry.triangle()

    t1.show()

    Hamza Ahmed June 7, 2020 7:33 pm Reply
  • Sir, can you please tell me how we can pass input taken by the user to the object of inner class

    Tanya AGGARWAL June 7, 2020 7:33 pm Reply
  • sir ye video to bilkul bhi samaj nhi aayi
    can u can a simple version of this video …plz

    Yash Gaur June 7, 2020 7:33 pm Reply
  • Sir ye confusing h smg nhi aaya 2 bar dekha video pls explain

    TANMAY KUMAR June 7, 2020 7:33 pm Reply
  • Sir can you please explain regarding creating object of inner class??
    and explain again regarding:
    self.lap=self.Laptop()
    and
    self.lap.show()

    asmita barman June 7, 2020 7:33 pm Reply
  • why didn't we use self,cpu,ram in laptop class

    Amber Agarwal June 7, 2020 7:33 pm Reply
  • Why is it necessary to define object of inner class in the init of outer class?

    Nitesh Chaurasia June 7, 2020 7:33 pm Reply
  • Holy crap these are amazing quality and very well produced. The audio was good, the camera nice, It was well lit, and the little animated graphics were a nice touch and of good quality as well. This goes far beyond any typical Youtube tutorial on these kinds of topics.
    Thank you so much for paying attention to these kinds of details. They mean so much more than most people know. Thank you so much.

    Kipper Klank June 7, 2020 7:33 pm Reply
  • 6:23 lol

    Suruchi Sarkar June 7, 2020 7:33 pm Reply
  • What if I want to ask the user to enter the values for ram , cpu and brand.
    I mean I don't want to enter values within the program , then how can I do it. Please reply sir

    Aman Pokhriyal June 7, 2020 7:33 pm Reply
  • Venkateswarlu Guntaka June 7, 2020 7:33 pm Reply
  • Sir
    Pls upload a video of tkinter in python🙏

    The wanderlust Teens creations June 7, 2020 7:33 pm Reply
  • why don't you upload the notes of python course in your website

    shivaan June 7, 2020 7:33 pm Reply
  • Sir please give us a project with python, because I am a engineering student (IT),so make the videos for a project.

    Saurabh Pratap Singh June 7, 2020 7:33 pm Reply
  • class Student:

    def __init__(self):

    self.name

    self.roll

    def setdata(self,name,roll):

    self.name=name

    self.roll=roll

    def showdata(self):

    print(self.name,self.roll)

    s1=Student()

    s1.setdata("mohit",71)

    s1.showdata()

    please, anyone tell me what is wrong with this code …. I tried to assign the values in setdata method rather than init method.

    Mohit Dhiman June 7, 2020 7:33 pm Reply
  • Why we have to use self. Laptop().

    Runchod Patil June 7, 2020 7:33 pm Reply
  • lap1 =s1.lap
    whatb does it create
    object????
    i don't understand 5:05

    Ayushi Jindal June 7, 2020 7:33 pm Reply
  • Sir! Can I have ur Instagram I'd name? Sir

    kanna shanthi June 7, 2020 7:33 pm Reply
  • thanks for your hard work for us.bcos of ur effort we able to learn python

    Soniya Chauhan June 7, 2020 7:33 pm Reply
  • sir how do we pass data to inner class through objects of the outer class?

    Amey Athavia June 7, 2020 7:33 pm Reply
  • navin ji, is there any way of get more example of this video ?

    Rajib Guha June 7, 2020 7:33 pm Reply
  • if we don't provide any decorator and call method using ClassName it still works. So why to have decorator ????. e.g method is just printing random string.

    Rrahul MAne June 7, 2020 7:33 pm Reply
  • where we are declaring the lap key word

    Parimi Mounika June 7, 2020 7:33 pm Reply
  • phenomenal videos!

    Christian Basile June 7, 2020 7:33 pm Reply
  • I love the way of presentation

    ANURAG KUMAR PANDEY June 7, 2020 7:33 pm Reply
  • thank you sir………

    SHIVANSHU UDENIYA June 7, 2020 7:33 pm Reply
  • Sir I have a doubt, what if we want a parameterized constructor in inner class then how to call it and execute it? I tried it but I am getting error inside outer class constructor. Please help me out sir.

    Here she is June 7, 2020 7:33 pm Reply
  • Can anyone tell me how I access the outer class constructor in inner class?

    Html Hhttmmll June 7, 2020 7:33 pm Reply
  • very good tutorial, however if OOP is concerned i watched other tutorials on you tube by Corey Schafer for better understanding of the concept.
    Moreover, i found your way to create object for the subclass inside the parent class (as attribute)quite unfamiliar!.
    Thank you for tutorial, very helpful , THANK YOU

    elingo June 7, 2020 7:33 pm Reply
  • #When I run this code, its show the output :

    hp, 16

    None

    #Why it printing None

    class Student :

    def __init__(self, name, marks):

    self.name = name

    self.marks = marks

    def show(self):

    print(self.name, self.marks)

    class Laptop:

    def __init__(self, brand, ram):

    self.brand = brand

    self.ram = ram

    def show(self):

    print(self.brand, self.ram)

    lap1 = Student.Laptop('hp', 16)

    print(lap1.show())

    Vikas Virodhiya June 7, 2020 7:33 pm Reply
  • plz make a video about linked list in python

    Harsh Tiwari June 7, 2020 7:33 pm Reply
  • He is stupid

    Momona Games June 7, 2020 7:33 pm Reply
  • How to take user input for inner class variables

    sami abdul June 7, 2020 7:33 pm Reply
  • How can we take input from the user like name and age marks of students

    Vadiraj Vaidya June 7, 2020 7:33 pm Reply
  • Best video tutorials I've come across yet. Mucho gracias.

    Daniel June 7, 2020 7:33 pm Reply
  • You are awesome sir ❤

    Moaz El-sawaf June 7, 2020 7:33 pm Reply
  • How to dynamically input into the inner function and append that value to a list

    Hemanth Yernagula June 7, 2020 7:33 pm Reply

Leave a Reply

Your email address will not be published. Required fields are marked *