Solve 10 problems on functions in python

Поделиться
HTML-код
  • Опубликовано: 17 янв 2025

Комментарии • 494

  • @justtt.prerna
    @justtt.prerna 11 месяцев назад +28

    I know some basics of python but whenever I watch your videos , I consistently gain new insights and knowledge.

    • @TooniMe
      @TooniMe 10 месяцев назад +1

      But your code shows errors lol

  • @hellohere-iamhello
    @hellohere-iamhello 6 месяцев назад +17

    19:52
    import math
    def circle_stats(radius):
    area = math.pi* 2 * radius**2
    circumference = 2 * math.pi * radius
    return area, circumference
    a, c = circle_stats(3)
    print(f"Area = {round(a,2)}
    Circumference = {round(c,2)}")

    • @saswatsubhadarshi4290
      @saswatsubhadarshi4290 28 дней назад

      f stream print(f"Area={area: .2f},circumference={circumference:.2f}")

  • @zakirdev
    @zakirdev 10 месяцев назад +4

    I have been working as a software developer since 2019. I have started coding since 2014. I have watched a lot of tutorials and read many books. But today I understood "Generator" properly. Thank you sir, you are really great. ❤❤

  • @softNandan
    @softNandan 11 месяцев назад +9

    Solution of 20:26 :
    print(“area:”,round(a,2),”circumference”,round(b,2))

  • @SadmanSakib2001
    @SadmanSakib2001 11 месяцев назад +10

    51:00
    So, basically what I've understood,
    "yield" is kind of like the "static" keyword which is used in c/c++.
    when we say, "static int a = 5;" inside of a function & we call that function multiple times or call that function using a loop, that static variable "a" saves it's previous state in memory & performs the next tasks with it's previous state every single time function is called.
    not saying they are the same. But yeah, i found it familiar.

  • @muhammadhilal5807
    @muhammadhilal5807 10 месяцев назад +6

    To avoid those recurring decimal in solution_04, we can use round() method to avoid those recurring decimals and can convert it to 1 , 2 or any decimal place you like.
    Source Code:
    import math
    def circle_stats(radius):
    area = round(math.pi * radius ** 2,2)
    circumference = round(2 * math.pi * radius,2)
    return area, circumference
    a , c = circle_stats(3)
    print("Area: ", a, "Circumference: ", c)

    • @SamiButt-bc2xh
      @SamiButt-bc2xh 7 месяцев назад

      import math
      def circle(radius):
      area = round(math.pi*(radius**2),2)
      circumference = round((2 * math.pi * radius) ,2);
      return area , circumference;
      r = int(input("Enter Radius: "))
      a , c = circle(r)
      print("The Area is: ",a)
      print("The Circumference is: ",c)

    • @SamiButt-bc2xh
      @SamiButt-bc2xh 7 месяцев назад

      in your code you are not defined how many precision after point like 2,3or 4

  • @epslearns
    @epslearns 9 месяцев назад +8

    19:45
    Precision can be achieved using round() function as given below:
    def circle_stats(radius):
    area=math.pi*radius**2
    circumference=2*math.pi*radius
    return *round(area,2),round(circumference,2)*
    print(circle_stats(5))
    (78.54, 31.42)
    *Further, can we round off multiple values at once instead of doing separately for each one?*

    • @Nirvik-y4m
      @Nirvik-y4m 2 дня назад

      either you can go with this " print("Area:",f"{area:.2f}
      circumference:{circum:.2f}") "

  • @shikharpandya4927
    @shikharpandya4927 10 месяцев назад +4

    amazing video :)
    TimeStamp:-
    20:24
    Precision upto x decimal places can be achieved by using
    round(variable_name,x)

  • @swarnabhamajumder9561
    @swarnabhamajumder9561 11 месяцев назад +3

    Learning Python day 10 - present sir
    00:03 Introduction to functions in Python
    02:16 Learning functions in Python with confidence
    06:06 Variables and function parameters in Python
    08:07 Using the return keyword to output a result from a function in Python
    12:05 Polymorphism in Python functions
    14:17 Creating functions to return multiple values in Python
    18:22 Returning multiple values from a function in Python
    20:22 Creating and handling functions in Python.
    24:13 Creating a function to compute the cube of a number
    25:53 Understanding function definitions in Python
    29:25 Using Python's special parameters to handle input values efficiently.
    31:21 Printing and investigating errors in Python functions
    34:53 Functions in Python and their usage with keyword arguments
    36:52 Understanding function definitions and arguments in Python
    40:42 Using formatting strings to print values in Python functions
    42:33 Creating a function to generate even numbers with a limit in Python.
    46:37 Understanding function implementation in Python
    48:38 Functions in Python use yield to produce a sequence of values
    52:16 Creating a function to calculate factorial and understanding recursion
    54:18 Recursive approach to calculate factorial in Python
    57:56 Learned the key concepts of functions in Python

  • @dakshbhatnagar
    @dakshbhatnagar 11 месяцев назад +2

    51:07 I have worked on some personal projects in deep learning and one use case of yield is handling huge amount of datasets where we need to fetch a batch of numbers from the datasets to perform calculation of gradients during backpropogation which is a way to optimized neural networks loss calculations

  • @Dheerajsingh-n8k
    @Dheerajsingh-n8k 10 месяцев назад +2

    The video script covers various topics related to functions in Python, including calling functions, polymorphism, handling values, generator functions, recursion, and function parameters. It also introduces upcoming topics in a new series on Python programming with a focus on making videos with tea.
    Introduction to Python Functions and Syntax
    Introducing a new series on Python with a focus on making videos with tea.
    Upcoming topics include functions, loops, and confidence in Python programming.
    Explaining the basics of function syntax and parameters in Python.
    Understanding Python Function Parameters and Return Values
    Explaining the concept of placeholders and parameters in Python functions.
    Demonstrating how to use multiple parameters and return values in Python functions.
    Understanding the process of adding and printing multiple values in Python functions.
    Understanding Function Execution in Python
    Explaining how to call a function and provide two numbers
    Discussing the value and print function in Python
    Understanding polymorphism and function multiplication in Python
    Understanding Function Parameters and Return Values in Python
    Execution stops if area is not calculated
    Hold the area and calculate the circumference
    Learning about function parameters and return values
    Understanding Python Functions and Syntax
    Basic definition of under solution function
    Defining and using the add method with parameters
    Explaining the concept of nested functions and the pass keyword
    Handling Multiple Arguments in Python Functions
    The speaker discusses handling multiple arguments in Python functions.
    He explains how to use asterisk (*) to handle an arbitrary number of arguments.
    The speaker demonstrates creating a function that accepts any number of keyword arguments.
    Understanding the Syntax of Print Function in Python
    Explaining the concept of value and how to use it in Python.
    Demonstrating the syntax and usage of the print function with parameters.
    Understanding the handling of arguments and values in the print function.
    Understanding Python Generator Functions and Yield Concept
    Learning how to handle values and pairs within Python generator functions.
    Exploring the yield concept and its significance from a memory perspective.
    Understanding the usage of range and skip count within Python generator functions.
    Understanding the Implementation of Yield and Recursion in Python
    Explaining the process of creating a list using the append method
    Implementing the yield method to add values to the list
    Introduction to the concept of recursion and its application in calculating factorials
    Understanding Recursion and Factorial Calculation
    Recursion involves calling a function from within itself
    Factorial calculation using recursion involves breaking down the problem and solving it step by step
    Focus on developing a good exit strategy when working with recursion

  • @Barunghorai-pn4vy
    @Barunghorai-pn4vy 9 месяцев назад +1

    You are the best teacher,❤ in this platform,,

  • @pranaypaul6361
    @pranaypaul6361 11 месяцев назад +1

    Kudos to you, sir, for explaining yield in such a simplified manner, as if you were explaining it to a 5-years-old.

  • @sheikhabdullah8298
    @sheikhabdullah8298 11 месяцев назад +2

    Sir, apke help se hum sab to hopeful hain... Thanks Alot!

  • @priya_chauhan1258
    @priya_chauhan1258 10 месяцев назад +11

    20:12
    1) first method
    Below formatted variable will be displayed with 5 decimal values
    formatted = "{:.5f}".format(9.999875698989)
    print(formatted) # output : 9.99988
    And suppose we write like this
    formatted = "{:.3f}".format(9.999875698989)
    print(formatted) # output : 10
    Then it will return 10 as output.
    2) using round()
    In this function we will pass two parameters, first is our value or variable and second is how many decimal values we want.
    Example_1:
    Number = 5.375829473
    print(round(Number,2) # output : 5.36
    Example_2 :
    print(round(5.53627894,2)) # output : 5.53

    • @aditya536
      @aditya536 6 месяцев назад

      Great! The format method was new to me.

  • @umairansari5392
    @umairansari5392 5 месяцев назад +1

    20:10
    import math
    def circle_stats(radius):
    area = math.pi * radius * radius
    circumference = 2 * math.pi * radius
    return area, circumference
    a, c = circle_stats(3)
    print(f"Area: {a:.3f}, Circumference: {c:.3f}")

  • @shreyanshmalewar1208
    @shreyanshmalewar1208 4 месяца назад

    Thanks for such a simplistic, professional and in-depth content
    for question 6(26:06), I used this:
    cube = lambda user_in: user_in ** 3
    user_in = float(input('Input a number for cube'))
    print(cube(user_in))

  • @anuraggupta1008
    @anuraggupta1008 11 месяцев назад +15

    Yr 900 views h fir bhi 400 comment kyu nhi hai😢 support kro yr sab chai aur code ko

  • @ABDULSAMI-z1k
    @ABDULSAMI-z1k 5 месяцев назад

    my mind is just tuned with all your words, they just directly print into my mind i just simply run those without any errors , i think you have hacked my mind....grate full to u sir

  • @atharvatirkhunde4517
    @atharvatirkhunde4517 10 месяцев назад +2

    thank you sir. I came to know about yeild for the first time. One application of args is in shoping cart.

  • @anuraggupta1008
    @anuraggupta1008 11 месяцев назад +1

    Sab mil kar appreciate kro yr sir ki dedication ko quality content ke liye..😊

  • @Dheerajsingh-n8k
    @Dheerajsingh-n8k 10 месяцев назад

    00:00
    Introduction to Python Functions and Syntax
    05:54
    Understanding Python Function Parameters and Return Values
    11:47
    Understanding Function Execution in Python
    17:41
    Understanding Function Parameters and Return Values in Python
    23:33
    Understanding Python Functions and Syntax
    29:30
    Handling Multiple Arguments in Python Functions
    35:24
    Understanding the Syntax of Print Function in Python
    41:17
    Understanding Python Generator Functions and Yield Concept
    47:12
    Understanding the Implementation of Yield and Recursion in Python
    53:06
    Understanding Recursion and Factorial Calculation
    53:06Recursion involves calling a function from within itself
    54:11Factorial calculation using recursion involves breaking down the problem and solving it step by step
    56:04Focus on developing a good exit strategy when working with recursion

  • @predator1999
    @predator1999 3 месяца назад

    20:11 import math
    def circlestat(radius):
    area = math.pi * radius **2
    circumference = 2* math.pi *radius
    return area ,circumference
    a,b = circlestat(6)
    a= round(a,3)
    b=round(b,3)
    print("area: ",a , "circumference",b)
    round() is used to take those values upto 2 or 3 decimal places only

  • @viditvats5733
    @viditvats5733 10 месяцев назад

    We can use the f-strings functionality. For example, if we want precision up-to 2 digits, then we can type: -
    print(f"Area : {a:.2f} Circumference: {c:.2f}")

  • @navidbinahmed
    @navidbinahmed 20 дней назад

    became a fan watching your video on 'tech for 2025'...im a pseudo python developer from bangladesh, your new follower. best wishes, bro.

  • @ashishkumarbhagwani6931
    @ashishkumarbhagwani6931 7 месяцев назад +1

    We do use round method for getting precise values. e.g., round(number, 2) for getting precision upto 2 digits.

  • @shaikusman536
    @shaikusman536 8 месяцев назад

    Super Guru ji.....Very insightful.....You are a great teacher Hitesh sir ji....keep up the great work......Respect from Bangalore...

  • @prabhatthakur8730
    @prabhatthakur8730 11 месяцев назад

    Now I'm feeling that I'm diving into the internal working of python. The way he explains every topics that is phenomenal. I'm regularly waiting for his python series videos. Thanks sir for making this wonderful series.

  • @sandeepverma8681
    @sandeepverma8681 10 месяцев назад

    00:03 Introduction to functions in Python
    02:16 Learning functions in Python with confidence
    06:06 Variables and function parameters in Python
    08:07 Using the return keyword to output a result from a function in Python
    12:05 Polymorphism in Python functions
    14:17 Creating functions to return multiple values in Python
    18:22 Returning multiple values from a function in Python
    20:22 Creating and handling functions in Python.
    24:13 Creating a function to compute the cube of a number
    25:53 Understanding function definitions in Python
    29:25 Using Python's special parameters to handle input values efficiently.
    31:21 Printing and investigating errors in Python functions
    34:53 Functions in Python and their usage with keyword arguments
    36:52 Understanding function definitions and arguments in Python
    40:42 Using formatting strings to print values in Python functions
    42:33 Creating a function to generate even numbers with a limit in Python.
    46:37 Understanding function implementation in Python
    48:38 Functions in Python use yield to produce a sequence of values
    52:16 Creating a function to calculate factorial and understanding recursion
    54:18 Recursive approach to calculate factorial in Python
    57:56 Learned the key concepts of functions in Python
    Crafted by Merlin AI.

  • @iam_vijay.21
    @iam_vijay.21 4 месяца назад

    Great video, yr 2 din se kuch smj nhi aa rha tha ise dekh k maza aa gya

  • @MukeshKumar-nn4nq
    @MukeshKumar-nn4nq 11 месяцев назад +10

    kahan gayi janta , abhi 10 din aur aaye gii videos. Comments target priority

  • @Dooodley_shorts_000
    @Dooodley_shorts_000 2 месяца назад

    your teaching style is relax and pressure free

  • @countryno446
    @countryno446 5 месяцев назад

    The way he explained Yield keyword is beautiful !! LoveFromINDORE

  • @virendrthakur7865
    @virendrthakur7865 7 месяцев назад

    this is my favorite youtube channel , nice teaching sir ji

  • @becomewhatyouarenot-gc3bd
    @becomewhatyouarenot-gc3bd 11 месяцев назад

    Best Video Ever on Functions

  • @mahipalsingh-pc4mo
    @mahipalsingh-pc4mo 9 месяцев назад +1

    really a good teaching technique sir

  • @kishandata23
    @kishandata23 11 месяцев назад

    ❤ the way of teaching
    Direct jump on hands on approach

  • @sidharthkashyap6241
    @sidharthkashyap6241 10 месяцев назад +1

    Amazing content sir..❤..if you plan to make another lecture, plz dive in little more in Recursion and Yield concept .

  • @hackerstv197
    @hackerstv197 20 дней назад +1

    import math
    def circle_stats(radius):
    area = math.pi * radius ** 2
    circumference = 2 * math.pi * radius
    return area, circumference
    a, c = circle_stats(3)
    print("Area", round(a), "Circumference", round(c))

    • @hackerstv197
      @hackerstv197 20 дней назад +1

      Syntax = round(number, digits)

  • @priyankagehlot9945
    @priyankagehlot9945 5 месяцев назад

    51:00 amazing explanation sir👏

  • @umar155
    @umar155 6 месяцев назад

    I have never ever seen this kind of teaching 🙏,Thank you sir for you your efforts for us.

  • @umeshkr9316
    @umeshkr9316 8 месяцев назад

    thank you so much for teaching us in depth, lots of love from Jharkhand

  • @KaushalLakhani-b2g
    @KaushalLakhani-b2g 11 месяцев назад +2

    Exited for the series that will based on python, Please start with Django if possible, It will be next level in your style and explanation in depth ♥

    • @afzalhamdulay
      @afzalhamdulay 11 месяцев назад +1

      yup. django from his side will be amazing

  • @pritamacharjee4726
    @pritamacharjee4726 26 дней назад

    20:26 round to 2 decimal :- round(a,2)
    Output: 28.27

  • @winter_1306
    @winter_1306 11 месяцев назад +1

    reached functions!🥳 was left behind a few videos for a while, but covering it up!!!!🤧

  • @anuraggupta1008
    @anuraggupta1008 11 месяцев назад

    Please yr sab mil kr appreciate kro channel ko chai aur code 😊❤
    Yaha behind the scenes sikhne ko milta hai

  • @OMKARANAVKAR
    @OMKARANAVKAR 11 месяцев назад +5

    20:20
    Round method can be used to get result with n decimal places.
    print "Area:", round(a,n), "Circumference:", round(c,n))

  • @gopalpatil86
    @gopalpatil86 3 месяца назад

    Thank you for this video, never learned in this simplified way

  • @shaikusman536
    @shaikusman536 8 месяцев назад

    Awsome Guru ji.......Pls make more videos on python DSA focused on Data Science and Machine Learning........Respect from Bangalore...

  • @dsairaghavsumanth6756
    @dsairaghavsumanth6756 5 месяцев назад

    def sums(*arg):
    total =0
    for i in arg:
    total+=i
    print(total)
    sums(1200.50,
    340.75,
    560.00,
    980.25,
    2150.00)

  • @samarthkhakhkhar6703
    @samarthkhakhkhar6703 10 месяцев назад

    I love your teaching hitesh sir !!! I connect with you in coding

  • @hetashrikansariwala9527
    @hetashrikansariwala9527 11 месяцев назад

    Thank you sir for building this things easily

  • @khushivyas970
    @khushivyas970 9 месяцев назад

    Thank you so much sir for ❤ I love your way to teach and enjoying ever vedio of Chay and code .thank you❤

  • @gautamraj8114
    @gautamraj8114 11 месяцев назад +1

    This series YIELDS in depth knowledge.😁😁

  • @tuhinghosh9737
    @tuhinghosh9737 10 месяцев назад

    Now "yield" is very clear to me ❤

  • @abhirajsinha23
    @abhirajsinha23 9 месяцев назад

    Such in depth explanation is astonishing in free courses! 🙌

  • @vishalkandu1031
    @vishalkandu1031 11 месяцев назад

    sir aapko killvish ko bhi add karna chahiye tha main villan ki tor pe
    wese is tarike se python ke function ko sikh kar ke maza hi aa gaya
    love from mumbai sir ji ❤❤

  • @jd26831475
    @jd26831475 11 месяцев назад

    for Area and Circumference exercise, we can use Round of method to get result printed by 2 or 3 digits.

  • @Entertainment-xu1qc
    @Entertainment-xu1qc 10 месяцев назад

    the best channel to learn Python. need flask tutorial too Sir.

  • @shivkumarpatel8464
    @shivkumarpatel8464 11 месяцев назад

    Thank you so much sir , we really love this series also. ❤❤

  • @Rajeshmaurya-tz9ez
    @Rajeshmaurya-tz9ez 2 месяца назад

    One word-wow! Truly amazing!

  • @MDFAIZANSARI
    @MDFAIZANSARI 10 месяцев назад

    Every topic is explained very neatly and clearly.

  • @MuhammadWaqas-hj2nu
    @MuhammadWaqas-hj2nu Месяц назад

    Simply by Using round()
    function
    it takes up to 2 parameters
    import math
    def calc(radius):
    area = math.pi * (radius **radius)
    c = 2*math.pi*radius

    return round(area, 2), round(c, 2)
    areaOut ,c = calc (5)
    print(f"Area : {areaOut}
    Circumference : {c}")

  • @deepakkgupta
    @deepakkgupta 10 месяцев назад

    Amazing explanation sir ❤

  • @saunLogan
    @saunLogan 3 месяца назад

    Awesome lessons!!! Very well explained

  • @ShivamMishra-ut1cd
    @ShivamMishra-ut1cd 6 месяцев назад

    Thank you Sir, You really made thing so easy to understand.

  • @ffstriker8102
    @ffstriker8102 5 месяцев назад

    05) USER INPUT
    def greet(name="USER"):
    return "HELLO ," + name + " !"
    n1 = str(input("ENTER YOUR NAME : "))
    if len(n1) >0:
    print(greet(n1))
    else:
    print(greet())

  • @vishalrathore7052
    @vishalrathore7052 9 месяцев назад +1

    very nice recursive problem solving approch

  • @anik007
    @anik007 11 месяцев назад

    # Function Returning Multiple values
    # Problem : Create a function that returns both the area and circumference of a circle given its radius.
    import math
    def circle_stats(radius):
    area = math.pi * radius ** 2
    circumference = 2 * math.pi * radius
    return area , circumference
    a , c = circle_stats (3)
    print("Area: ", round(a,2), "Circumference: ",round(c,2)) #Assignment

  • @hemantkumardas3333
    @hemantkumardas3333 11 месяцев назад

    Very nicely explaining sir...

  • @yashchhatrala9207
    @yashchhatrala9207 6 месяцев назад

    Problem 4:
    import math
    def calc_circle(radius):
    area = math.pi * radius ** 2
    circumference = 2 * math.pi * radius
    return area, circumference
    a, c = calc_circle(3)
    print("Area: ", round(a, 2), "Circumference: ", round(c, 2))

  • @yashrahadve
    @yashrahadve 9 месяцев назад +1

    "This series is a hidden treasure for programmers."

  • @risingaw1163
    @risingaw1163 9 месяцев назад

    import math
    def circle_calculate(radius):
    area = math.pi *radius**2
    circumference = 2 * math.pi * radius
    return area, circumference
    a,c = circle_calculate(3)
    print("Area:",round(a,2), "Circumference:",round(c,2))

  • @mr.darksyt786
    @mr.darksyt786 4 месяца назад

    19:51
    print(f"Area: {a:.2f}
    Circumference: {round(c,2)}")

  • @Airman.programer
    @Airman.programer 5 месяцев назад

    def radius(r):
    area = 3.14* r*r
    circumference = 2*3.14*r
    return area, circumference
    area, circumference = radius(5)
    formatted = "{:.3f}".format(area)
    formatted = "{:.3f}".format(circumference)
    print(formatted)
    # print(radius(5))

  • @afzalhamdulay
    @afzalhamdulay 11 месяцев назад

    people who didn't understood how actually the yield program in solution 9 works, read below to understand....
    Function Definition:
    The program starts by defining a generator function named even_gen.
    This function takes one parameter limit, which represents the upper limit of the range of even numbers to generate.
    Inside the function, a for loop is used to iterate over a range starting from 2 (the first even number) up to and including the specified limit, incrementing by 2 in each step.
    Within the loop, the yield keyword is used to yield (or generate) each even number.
    Generator Function Execution:
    When the even_gen function is called with an argument (e.g., even_gen(10)), it doesn't start executing immediately. Instead, it returns a generator object.
    The generator object represents an iterable sequence of even numbers based on the specified limit.
    Iteration using a for loop:
    The generator object returned by even_gen is iterated over using a for loop.
    In each iteration, the for loop retrieves the next value from the generator using the next() function implicitly.
    The next() function resumes the execution of the generator function until the next yield statement is encountered.
    The value yielded by the yield statement (an even number) is assigned to the variable num, and the loop body is executed.
    Printing Even Numbers:
    Inside the loop body, each even number generated by the even_gen function is printed using the print statement.
    In this case, the even numbers from 2 to 10 are printed, as the limit argument passed to even_gen is 10.
    End of Iteration:
    The for loop continues iterating until there are no more values to yield from the generator.
    Once all the even numbers within the specified range are yielded and processed, the loop terminates.
    Program Termination:
    After the loop finishes execution, the program ends as there is no more code to execute.
    In summary, the program defines a generator function that yields even numbers within a specified range, and then iterates over the generated numbers, printing each one. This approach efficiently generates and processes even numbers one at a time, conserving memory compared to storing all even numbers in a list.

  • @VARUNVERMABCE
    @VARUNVERMABCE 11 месяцев назад

    Sir whatever you will to teach I'll learn all of it

  • @subratkumarnayak2560
    @subratkumarnayak2560 6 месяцев назад

    really loved this way of learning...

  • @hari_1357
    @hari_1357 11 месяцев назад

    Thank you soooooo much sir!!

  • @viz_dugz
    @viz_dugz 11 месяцев назад

    this is a very important video of the series, DO NOT SKIP

  • @kumargupta7149
    @kumargupta7149 11 месяцев назад

    Love this way of solving problem learning ❤

  • @samiran__roy
    @samiran__roy 11 месяцев назад

    best creater of youtube

  • @NeelVaria-ji3nx
    @NeelVaria-ji3nx 5 месяцев назад

    import math
    def circle_stats(radius):
    circle = math.pi * radius ** 2
    circumference = 2 * math.pi * radius
    return round(circle,2), round(circumference,2)
    radius = int(input("Enter radius: "))
    circle, circumference = circle_stats(radius)
    print("Area: ",circle ,"&" , "Circumference: ",circumference)

  • @dsairaghavsumanth6756
    @dsairaghavsumanth6756 5 месяцев назад

    def area_circumference(a):
    area = (3.14)*(a)*(a)
    circumference =2*3.14*(a)
    print("area=",area)
    print("circumference=",circumference)
    a = float(input("enter the radius:"))
    (area_circumference(a))

  • @nikshadali50
    @nikshadali50 11 месяцев назад

    Thank you Sir for your efforts

  • @iamprogrammer5054
    @iamprogrammer5054 4 месяца назад

    Good way of teaching 👍

  • @vandanapatil8182
    @vandanapatil8182 11 месяцев назад

    Explanation of Recursive function with pen & diagram sir 😊

  • @AdityaSharma-fc1sx
    @AdityaSharma-fc1sx 11 месяцев назад

    Thank you so much sir ❤❤

  • @vishalpatil-ty9ve
    @vishalpatil-ty9ve 11 месяцев назад

    print(“area:”,round(a,2),”circumference”,round(b,2))

  • @umeshmehta3664
    @umeshmehta3664 11 месяцев назад +1

    20:23
    # Use string formatting to round to 2 decimal places
    print("Area: {:.2f}, Circumference: {:.2f}".format(a, c))
    # Use the round() function to round to 2 decimal places
    print("Area:", round(a, 2), "Circumference:", round(c, 2))

  • @dsairaghavsumanth6756
    @dsairaghavsumanth6756 5 месяцев назад

    def square(a):
    print(a*a)
    a =int(input("enter the number:"))
    square(a)

  • @harshakp06
    @harshakp06 9 месяцев назад

    28:21
    cube = lambda x : x**3
    a = cube(4)
    print(a)
    print(cube(3))
    it seems we can lambda like as def

  • @meenakshimeeen
    @meenakshimeeen 4 месяца назад

    you explained very well, thank you sir

  • @adityapratapsingh7140
    @adityapratapsingh7140 5 месяцев назад

    Loved it!!!! Thank you so muchhh💞

  • @sufiyanpatel6241
    @sufiyanpatel6241 5 месяцев назад

    Perfect Teaching 👌

  • @decoder_pankaj
    @decoder_pankaj 5 месяцев назад

    THANK YOU SIR FOR THIS AMAZING SERIES 🥳🥳

  • @afzalhamdulay
    @afzalhamdulay 11 месяцев назад

    commenting just because for your hard work

  • @sknitpsycho
    @sknitpsycho Месяц назад

    import math
    def cs(r):
    area = math.pi * r ** r
    circumference = 2 * math.pi * r
    return area, circumference
    a, c = cs(3)
    # print(f"area: {round(a, 2)} Circumference: {round(c, 2)}")
    print(f"area: {a:.2f} Circumference: {c:.2f}")

  • @creator.007
    @creator.007 5 месяцев назад

    solution:-
    def radius(r1):
    area=math.pi*r1**2
    circumference=2*math.pi*r1
    return area, circumference
    a,c=radius(4)
    print(f"area={round(a,2)}
    circumference={round(c,2)}")

  • @harleeneyd
    @harleeneyd 10 месяцев назад

    20:10 we can use round() method :)