Classes, Methods, and Objects in python for beginners

Опубликовано: 01 Январь 1970
на канале: 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...


На этой странице сайта вы можете посмотреть видео онлайн Classes, Methods, and Objects in python for beginners длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Aryan Narwal 01 Январь 1970, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 30 раз и оно понравилось like зрителям. Приятного просмотра!