Dear Harry Sir, i am Mechanical engineer and started learning AI from last month.. and started learning python from your videos.. it was amazing... i made this program for "basic Area calculator" by learning up to this video.. Thank you def square_area(): sqside = float(input("enter side: ")) if sqside == 0: print("value should be more than zero") return sq_area = sqside ** 2 print("Area of Square is :", sq_area) return sq_area def rectangle_area(): b = float(input("enter first side ")) h = float(input("enter second side ")) if b == 0 and h == 0: print("value should be more than zero") return rec_area1 = b * h print("Area of Rectangle is", rec_area1) return rec_area1 def circle_area(): r = int(input("enter radius ")) circ_area1 = 3.142 * r * r print("Area of Circle is", circ_area1) return circ_area1 sq = square_area ci = circle_area re = rectangle_area print("Choose your entity ","sq for square ","re for rectangle ","ci for circle") ans= input("Enter entity to find area ") while(ans): if ans== "sq": print (square_area()) break if ans== "ci": print (circle_area()) break if ans== "re": print (rectangle_area()) break else: print("Wrong entity") break
Sir/Bro we 5 friends in a group started learning python from your videos . Really we realised we found coding so much easy . Please make videos on flutter .
Hi Harry, I really appreciate your efforts for creating such wonderful tutorial and it will help a lot to many people who are aspiring developers or who is interested in learning Python. Adding to it, can you please also add the video regarding functions to show the example where it can also return more than one values as generally function return only one value but in Python we can return more than value. If you have already added this example in any future examples then it is fine. I am pasting an example in the comment section. I hope you don't mind it. Thanks in advance and again appreciating your efforts... #Multiple values can be returned as result from the function: def function3(a,b): """This function will return values for addition and substraction both for entered numbers""" add_result = sum((a,b)) sub_result = a - b return add_result,sub_result add_value,sub_value = function3(7,5) print("Addition result is :",add_value,"Substraction result is :",sub_value)
def average(list_of_numbers,n): """Run the below program to find the average of numbers""" avg=(sum(list_of_numbers))/n return avg list_of_numbers = [] print(average.__doc__) n = int(input("For how many number are we finding average for? ")) i=0 while i
a = int(input("enter first number")) b = int(input("enter second number")) def rabban(a,b): """This is a function which will input two numbers and sum them and give ther summing result and there average.""" print("rabban gives this answer: Sum of these two numbers is:",a+b) average ="And average of these two numbers is",(a+b)//2 return average v=print(rabban(a,b)) # print(rabban.__doc__)
@@sayanNITdgp2025 seems like u have same interest ...robotics and mechanical .... Cool Can I get your fb id so that in future if get stuck ... I will take ur help
hello sir mene abhi 2021 - march me aapki series start ki hai great job aapane excercise 3 di wo complete ki hai SO jab hame guess the number chahiye mil jaye .........
Bro before you start, if you share the syntax on your screen then explain with definition, it will give the actual understanding better for limited users
User1=int(input (" Enter the number: ")) User2=int(input (" Enter the number: ")) def addition (user1,user2): Print("Your value is :",user1+user2) addition(user1,user2)
def function1(a,b): '''yes we are using function''' sum = a + b print(sum) return (sum) v=function1(12,2) print(v) print(function1.__doc__) output=== 14 14 yes we are using function
Thank you Harry for these awesome videos. Have 1 doubt in this video. Can we use this _doc_ string for the logic purpose in the program. For ex: if function1.__doc__ == "Harry": do something Can you please also tell the correct sequence of your playlists to be completed for Machine Learning course?
def table_print(i): """ This function prints table of any number given as function input""" j = 1 print("So you need the table of {} Here you go " .format(i)) while(j
# a = 9 # b = 8 # c = sum((a, b)) # built in function def function1(a, b): print("Hello you are in function 1", a+b) def function2(a, b): """This is a function which will calculate average of two numbers this function doesnt work for three numbers""" average = (a+b)/2 # print(average) return average # v = function2(5, 7) # print(v) print(function2.__doc__)
bhai mene ek average finder of ten number banaya hai :- print("this is firefluxer's super average finder") print("enter the first number") n1=input() print("enter the second number") n2=input() print("enter the third number") n3=input() print("enter the fourth number") n4=input() print("enter the fifth number") n5=input() print("enter the sixth number") n6=input() print("enter the seveth number") n7=input() print("enter the eighth number") n8=input() print("enter the nineth number") n9=input() print("enter the tenth number") n10=input() d=(int(n1)+int(n2)+int(n3)+int(n4)+int(n5)+int(n6)+int(n7)+int(n8)+int(n9)+int(n10))/10 print("Average(mean) ",end="") print("-") pls koi bhi like kar do agar acha laga to aur try karke run karke dekho agar ho sakey to harry bhai pls dil dedo
bhai apka program bilkul shi h bs last me apne jo print("-") ye likha h yha galti h. isko edit kr k shi kr lo... print(" ") iska matlab hota h jo bhi isme type kroge vo print ho jaega edit kr k aap print(d). likh do apka program correct ho jaega....
def funck1 (a,b): """Theis line are very importen so do not try to delete(this line name dock string) this is the doc strin if you want print this line so write-print(function name,__doc__)""" #average=(a+b)/2 #return average print(funck1. __doc__)
def myavg(n1,n2): """Thi is Doc String testing""" return(n1/n2) print("Enter numbers seperated by , to take average") a=list(map(int,input("Enter number:-").split(","))) b=float(myavg(sum(a),len(a))) print(myavg.__doc__) print("average of numbers entered is",b)
Actually Harry bhai I am CS student and I started your python in one video , now I am at the point of Recursion but I want to learn all things like Data structures so I want to access your python playlist but from where I can start it??
############ Functions and Docstrings Tutorial ################# # Function helps in code reuseability ########################################## ## Example of built in function a = 9 b = 8 # Sum is a inbuilt function in Python # takes tuple or list (more, general Iterables) as input c = sum((a,b)) print(c) # Output : 17 ########################################## ## Example of user defined function ## The keyword def introduces a function definition. # It must be followed by the function name and # the parenthesized list of formal parameters. # The statements that form the body of the function # start at the next line, and must be indented. def function1(): print("Hello you are in function 1") function1() # Output : Hello you are in function 1 ##### Functions with Parameter & Return Statement #### # The 'return' statement returns with a value from a function. # 'return' without an expression argument returns None # if no 'return' statement used in function , # then function returns None
print(function1()) # Output : Hello you are in function 1 (due to function call) # : None (due to no return statement) ## Functions with parameters def function2(a,b): print("You are in function 2,","Sum :",a+b) function2(5,7) # Output :You are in function 2, Sum : 12 def function3(a,b): average = (a+b)/2 print("Average :",average) function3(5,7) # Output : Average : 6.0 # If we want to store value calculated by function in a variable # We have to use return statement def function4(a,b): average = (a+b)/2 # print("Average :",average) return average val = function4(5,7) print(val) # Output : 6.0 ################ Doc strings ################## # Used to store information about function # """ Documentation """ or ''' Documentation ''' # # This is not a comment but docstring ... # ...if written as first line in function # written elsewhere in function treated as comment def function5(a,b): '''This is a function which calculates average of two numbers''' average = (a+b)/2 return average print(function5.__doc__) # Output : This is a function which calculates average of two numbers # docstring is helpful to know about functions # in diiferent imported modules # Also if we have large no. of functions # we can use docstring to know about function
The people who dislike don't know how many efforts go behind all these videos.... This is very nice explanation. Thanks Harry bhai!!
There is a reason why this guy has 7.3k likes over 69 dislike
What reason?
@@PawanKumar-ol5sl what do u mean?
What is reason of 7.3k likes pe 69 dislike ?
Aryan Kalra ne hi to kaha tha
Thanks!
You're exceptional harry. recommended you to brother of mine as well !
@Makai Asher lmaooo noob
you have same number of likes as harry's vid
i meant the digits are same
Dear Harry Sir, i am Mechanical engineer and started learning AI from last month.. and started learning python from your videos.. it was amazing... i made this program for "basic Area calculator" by learning up to this video.. Thank you
def square_area():
sqside = float(input("enter side:
"))
if sqside == 0:
print("value should be more than zero")
return
sq_area = sqside ** 2
print("Area of Square is :", sq_area)
return sq_area
def rectangle_area():
b = float(input("enter first side
"))
h = float(input("enter second side
"))
if b == 0 and h == 0:
print("value should be more than zero")
return
rec_area1 = b * h
print("Area of Rectangle is", rec_area1)
return rec_area1
def circle_area():
r = int(input("enter radius
"))
circ_area1 = 3.142 * r * r
print("Area of Circle is", circ_area1)
return circ_area1
sq = square_area
ci = circle_area
re = rectangle_area
print("Choose your entity
","sq for square
","re for rectangle
","ci for circle")
ans= input("Enter entity to find area
")
while(ans):
if ans== "sq":
print (square_area())
break
if ans== "ci":
print (circle_area())
break
if ans== "re":
print (rectangle_area())
break
else:
print("Wrong entity")
break
thankyou so much , your single comment made me understand and do my cs project😍🥰🤩which i couldnt complete past few weeks🥲😭
I like the docstring facility in python. It is really helpful for professionals.
He is a ""Desi Programmer""
Good job man....
great Fan !!!!
You have a error
Syntax error ⚠️
Bro you are genius ..
teaching techniques are spectacular..
docstring concept was really helpful..
Harry Bhai, I have watched many videos on return value and never really understood it. This video taught it to me very easily... Thank you so much!
Sir/Bro we 5 friends in a group started learning python from your videos . Really we realised we found coding so much easy .
Please make videos on flutter .
You are genius bro. Hame bhi add kar lo apne group me.
@@ravindrakaushik6245 bhia hmako bhul gaye ham
Tohre gar ke pecha to rhta hu
Bro you have notes
Bro thanks...... just completed 30 videos.....loved u r series :) it's my second language, i learned html and css now python
Never heard of doc strings but thanks to you for giving such knowledge
Hi Harry, I really appreciate your efforts for creating such wonderful tutorial and it will help a lot to many people who are aspiring developers or who is interested in learning Python. Adding to it, can you please also add the video regarding functions to show the example where it can also return more than one values as generally function return only one value but in Python we can return more than value. If you have already added this example in any future examples then it is fine. I am pasting an example in the comment section. I hope you don't mind it. Thanks in advance and again appreciating your efforts...
#Multiple values can be returned as result from the function:
def function3(a,b):
"""This function will return values for addition and substraction both for entered numbers"""
add_result = sum((a,b))
sub_result = a - b
return add_result,sub_result
add_value,sub_value = function3(7,5)
print("Addition result is :",add_value,"Substraction result is :",sub_value)
what if i need a run time choice between number of returns i needed
Thanks bro
6:26
def function2 (a, b):
formula = a**2 + b**2 + 2*(a*b)
return formula
answer = function2(2, 4)
print("answer is: ",answer)
def average(list_of_numbers,n):
"""Run the below program to find the average of numbers"""
avg=(sum(list_of_numbers))/n
return avg
list_of_numbers = []
print(average.__doc__)
n = int(input("For how many number are we finding average for? "))
i=0
while i
good one Vikaas
@CodeWithHarry your videos are fully dependable for learning
"Harry"- A man with no haters.
No man you are wrong. White hat jr.
@@nitikasharma3623 🙁🤣🤣🤣🤣🤣hmm 🤣
This was greatly explained Thanks Man ... Applauded ₹40
Harry you are just amazing, and the way you explained docstring is just awesome.
Apke last words Bohot kuch sikha kr gye 🤩..thanks Harry ji 😊
Thank Harry sir. App ne bahot ache se samjhaya.
Thanks Harry Bhai. You are the best. I have watched many videos on return value and never could really understand it. But now i do.
Aree bhai best explaination 👍
Thank you harry for discussing Doc String
Harry bhai , kya baat hai apne __doc__ very easily explain kiya. Thanks Harry bhai.
Mujhe to kuch bhi samj nhi aya
a = int(input("enter first number"))
b = int(input("enter second number"))
def rabban(a,b):
"""This is a function which will input two numbers and sum them and give ther summing result and there average."""
print("rabban gives this answer:
Sum of these two numbers is:",a+b)
average ="And average of these two numbers is",(a+b)//2
return average
v=print(rabban(a,b))
# print(rabban.__doc__)
Thanks Harry Bhai .. this really helps me a lot 😊
After coding in Scratch, its now very easy for me :D
def fun1(x,y,z):
print("The answer is:",x+y+z)
fun1(5,6,4)
15
Thanks, Harry Bhai for providing us with these python courses for free
Dil se shukriya harry bhai.. ❤️❤️❤️♥️♥️
Actually am mechanical engineer but I think (mechanical+Python =deadly combination ) for future ... thanks for these lectures
same for me
@@sayanNITdgp2025 you are from mechanical
@@robosapien1413 yupp
@@sayanNITdgp2025 seems like u have same interest ...robotics and mechanical .... Cool
Can I get your fb id so that in future if get stuck ... I will take ur help
@@robosapien1413 yes🤩....
My dream is Boston Dynamics
Ty so much sir bass apka he videos samjta hi u r really good
Ekdm mst content harry bhai.....
harry bhai apne website bohot acchi banayi hai .
Thank you! Was waiting for this video.
doc string concept was new for me.
Thanks harry bhai .
learned something new today! mloved it!
Hello Rohan das bro
hello sir
mene abhi 2021 - march me aapki series start ki hai
great job
aapane excercise 3 di wo complete ki hai
SO jab hame guess the number chahiye mil jaye .........
def multilpyfunc(a,b):
'''This function find the product of two given numbers '''
m=a*b
return m
x=multilpyfunc(3,5)
print(multilpyfunc.__doc__)
i m learning python through you.. sir 🙏🙏🙏❤️❤️
Great way of teaching Harry bhai
😍😍😍😍great man.....i love your videos ...u make easy to understand........really u are appreciatable
Thankuu harry bhai....ap great hooo
Thanks for crystal clear clearification... Keep posting
doc string is good thing I learn first time thank you
Bro before you start, if you share the syntax on your screen then explain with definition, it will give the actual understanding better for limited users
Thanks a lot and lots of respect 😊
Nice sir Thank you 🙏
You talked about data science jargons like R square. Can you pls make a series to cover all stats concept required for ML.
please give me your contact
Such a great video by a great sir.🤓
Must video ._docstring_ naya sikhne ne mila
you are really professional teacher..
Great tutorial bhai!!! Thank You😀😀
User1=int(input (" Enter the number: "))
User2=int(input (" Enter the number: "))
def addition (user1,user2):
Print("Your value is :",user1+user2)
addition(user1,user2)
upto the point.good work
Hello harry Bhai. here it is...
print(function2.__doc__)
i have reached on this video.
thank u so much for making this video
def function1(a,b):
'''yes we are using function'''
sum = a + b
print(sum)
return (sum)
v=function1(12,2)
print(v)
print(function1.__doc__)
output===
14
14
yes we are using function
keep going champ!!!
def functions ():
print ("Binod")
Function ()
Output= binod
love from Nepal harry bhai ❣ awesome video
This is some high class explanation..
Excellent Tutorials
that moment he speaks beta ka nam sikandr or hota dubla patla sa... i literally launghed
One of the best tutorial of python❤️🙏
Thank you Harry for these awesome videos. Have 1 doubt in this video. Can we use this _doc_ string for the logic purpose in the program.
For ex:
if function1.__doc__ == "Harry":
do something
Can you please also tell the correct sequence of your playlists to be completed for Machine Learning course?
Yes you can. Try it yourself. It works.
Thank you bhai
Thousands of likes for your video
concept cleared
Hello Harry! I m preparing competitive exam, your tutorial is very helpful for me lots of thanks❤
def table_print(i):
""" This function prints table of any number given as function input"""
j = 1
print("So you need the table of {}
Here you go
" .format(i))
while(j
# a = 9
# b = 8
# c = sum((a, b)) # built in function
def function1(a, b):
print("Hello you are in function 1", a+b)
def function2(a, b):
"""This is a function which will calculate average of two numbers
this function doesnt work for three numbers"""
average = (a+b)/2
# print(average)
return average
# v = function2(5, 7)
# print(v)
print(function2.__doc__)
Thank you sir
Hamre liai ye channel banana ke liai
bhai mene ek average finder of ten number banaya hai :-
print("this is firefluxer's super average finder")
print("enter the first number")
n1=input()
print("enter the second number")
n2=input()
print("enter the third number")
n3=input()
print("enter the fourth number")
n4=input()
print("enter the fifth number")
n5=input()
print("enter the sixth number")
n6=input()
print("enter the seveth number")
n7=input()
print("enter the eighth number")
n8=input()
print("enter the nineth number")
n9=input()
print("enter the tenth number")
n10=input()
d=(int(n1)+int(n2)+int(n3)+int(n4)+int(n5)+int(n6)+int(n7)+int(n8)+int(n9)+int(n10))/10
print("Average(mean) ",end="")
print("-")
pls koi bhi like kar do agar acha laga to aur try karke run karke dekho agar ho sakey to harry bhai pls dil dedo
Good bhai
bhai apka program bilkul shi h bs last me apne jo print("-") ye likha h yha galti h. isko edit kr k shi kr lo...
print(" ") iska matlab hota h jo bhi isme type kroge vo print ho jaega
edit kr k aap print(d). likh do apka program correct ho jaega....
Love you Harry bhaiya 😘😘😘😘😘😘
def funck1 (a,b):
"""Theis line are very importen so do not try to delete(this line name dock string)
this is the doc strin if you want print this line so write-print(function name,__doc__)"""
#average=(a+b)/2
#return average
print(funck1. __doc__)
Superb 🙏🙏🙏
thanks bro for teaching us.....
Ok Sir good ho gya👌
sir, i did,nt understand the topic,but your explanation was excellent
def myavg(n1,n2):
"""Thi is Doc String testing"""
return(n1/n2)
print("Enter numbers seperated by , to take average")
a=list(map(int,input("Enter number:-").split(",")))
b=float(myavg(sum(a),len(a)))
print(myavg.__doc__)
print("average of numbers entered is",b)
op bhai ek no explaination diye ho
please make a series on machine learning.
Thank you so much harry bhai❤❤
def functionname():
{
}
print(fuctionname.__doc__)
# in this way we print doc string of a function
Actually Harry bhai I am CS student and I started your python in one video , now I am at the point of Recursion but I want to learn all things like Data structures so I want to access your python playlist but from where I can start it??
You use light theme?
👀
🔥
sus
just love and respect from Pakistan
aap best ho bhai
Thank you Harry bhai for the video
def Average(a, b):
"""ths is a average function"""
avg = (a+b)/2
print(avg)
Average(5, 7)
print(Average.__doc__)
############ Functions and Docstrings Tutorial #################
# Function helps in code reuseability
##########################################
## Example of built in function
a = 9
b = 8
# Sum is a inbuilt function in Python
# takes tuple or list (more, general Iterables) as input
c = sum((a,b))
print(c) # Output : 17
##########################################
## Example of user defined function
## The keyword def introduces a function definition.
# It must be followed by the function name and
# the parenthesized list of formal parameters.
# The statements that form the body of the function
# start at the next line, and must be indented.
def function1():
print("Hello you are in function 1")
function1() # Output : Hello you are in function 1
##### Functions with Parameter & Return Statement ####
# The 'return' statement returns with a value from a function.
# 'return' without an expression argument returns None
# if no 'return' statement used in function ,
# then function returns None
print(function1())
# Output : Hello you are in function 1 (due to function call)
# : None (due to no return statement)
## Functions with parameters
def function2(a,b):
print("You are in function 2,","Sum :",a+b)
function2(5,7)
# Output :You are in function 2, Sum : 12
def function3(a,b):
average = (a+b)/2
print("Average :",average)
function3(5,7)
# Output : Average : 6.0
# If we want to store value calculated by function in a variable
# We have to use return statement
def function4(a,b):
average = (a+b)/2
# print("Average :",average)
return average
val = function4(5,7)
print(val)
# Output : 6.0
################ Doc strings ##################
# Used to store information about function
# """ Documentation """ or ''' Documentation '''
# # This is not a comment but docstring ...
# ...if written as first line in function
# written elsewhere in function treated as comment
def function5(a,b):
'''This is a function which calculates average of two numbers'''
average = (a+b)/2
return average
print(function5.__doc__)
# Output : This is a function which calculates average of two numbers
# docstring is helpful to know about functions
# in diiferent imported modules
# Also if we have large no. of functions
# we can use docstring to know about function
Bhai bhot ache se samjate ho aap
amazing bro !!!!
😊👏Nice
you are great sir
Thank you sir ❤️
Bhai tx yrr itna kuch hamare liye krne k liye
well done harry
nice...easy explainations....
Docstring works great can be used to see the docstring by using CTRL button
Sir you are print("Very Very Good teacher🤞🤞")
Error no emoji can print in python .
@@PawanKumar-ol5sl oh! It's a my mistake ok
def func1():
x = "Assignment"
return x
print(func1.__doc__)