Classes, Methods, and Objects in python for beginners

Published: 01 January 1970
on channel: Aryan Narwal
30
like

Welcome To Our channel
In this video learn everything about Classes, Methods, and Objects in python for beginners.
****************************code code code******************************
# make your own class
class printer:
# make your first method
def printer_namer(self):
return "Hello World"
# make your object
first_time = printer()
# access method of my object
print(first_time.printer_namer())

num1 = int(input("Enter first number: "))
num2 = int(input("Enter second number: "))
class calculator:
def __init__(self, num1, num2):
self.first_num = num1
self.second_num = num2
def add(self):
return self.first_num + self.second_num
cal1 = calculator(num1, num2)
# changing/manipulating object properties
cal1.first_num = 4
cal1.second_num = 5
# deleting object properties
# del cal1.first_num
# delete object
del cal1
print(cal1.add())
****************************code code code******************************
So consider Giving a video a like, share it with your friends and Subscribe to our channel too for more videos.
Instagram:   / rohitnarwal7988  
Python book for beginners and intermediate people: https://www.amazon.com/Python-simple-...
Python book for advance topics: https://www.amazon.com/Advance-Python...


On this page of the site you can watch the video online Classes, Methods, and Objects in python for beginners with a duration of hours minute second in good quality, which was uploaded by the user Aryan Narwal 01 January 1970, share the link with friends and acquaintances, this video has already been watched 30 times on youtube and it was liked by like viewers. Enjoy your viewing!