Why we have Python functions

Sdílet
Vložit
  • čas přidán 16. 07. 2024

Komentáře • 7

  • @jvsnyc
    @jvsnyc Před 3 lety +1

    I casually note that one payoff we get from separating out calc_gross_pay() is that if a minimum wage goes into effect, or mandatory overtime, those details can be properly isolated in there. So at start, it seems to be making a function for something trivial, but it actually gives us a single place to possibly deal with complexities imposed later.

  • @jvsnyc
    @jvsnyc Před 3 lety +1

    It is interesting to see how the terms Object-Oriented and Procedural get used. In C, when we were said to be doing procedural, we had primitives, arrays of primitives and user-defined structs, and the free-floating functions that operated on such. In Python, everything is an object, but programming procedurally means having ints, floats, complex numbers, strs, bools, dicts, lists, tuples, sets, frozensets, etc. and free-floating functions operating on them. I have noticed already some people teaching/using a style where the dict type was used as a rough analogue to single instances of a not very strictly designed struct. I found that very odd. Back to the video.

  • @stevew9945
    @stevew9945 Před 6 lety +1

    excellent description

  • @karimshaikh3900
    @karimshaikh3900 Před 6 lety +1

    Very good explanation!

  • @t_DaKaDa
    @t_DaKaDa Před 4 lety +2

    You are an excellent teacher more especially for visual students which helps me to visualize python. But in "User Defined Function" you turn to lose that graphical, visual moving pointing arrows you use within the code and showing or demonstrating. You rather use graphs not with a code. That becomes very dull for a visual student like me as a results i just jump straight to where there's code and those moving arrows you use. apart from that, i just notice you only person whose able to teach python language context which you can't get anywhere. last, i am making a promise to myself to donate to your work. otherwise it will be unethical to do this course for free.

    • @johnphilipjones
      @johnphilipjones  Před 4 lety +2

      Thank you for your positive feedback I am glad you like the videos. You are correct in this video I did not highlight using the arrows etc. However, I suspect it is because the video is more to do with software engineering than coding. Rest assured all of the Python videos that I am making from now on will always include the animated arrows etc.
      Best wishes Phil

    • @t_DaKaDa
      @t_DaKaDa Před 4 lety +2

      @@johnphilipjones thank you Mr Philip i ended up getting the point you were making in the lecture. Sir you can teach. have a great one.