Find The Maximum Number In A List Without Using max() | Python Example

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

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

  • @innatecharisma
    @innatecharisma Год назад +4

    You're a godsend for us junior developers. I salute you and your content and everything about you! Thanks a lot bro

    • @PortfolioCourses
      @PortfolioCourses  Год назад +1

      You’re very welcome and thank you for such kind words, it means a lot to me to hear this channel is helping you out! :-)

  • @PharaelMartins
    @PharaelMartins 2 года назад +2

    Cool! I'm glad I've just found your channel.
    Subscribed.
    Cheers. Thanks for the explanation.

    • @PortfolioCourses
      @PortfolioCourses  2 года назад

      You're welcome Raphael - and welcome aboard! :-)

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

    Which editor do you use?

  • @equalizer22_
    @equalizer22_ Год назад +1

    it's work cause 9 is the last value but if the last value was 8, it's superior than 3 but not the max

    • @PortfolioCourses
      @PortfolioCourses  Год назад

      The code will work no matter what the numbers in the list are. :-)

    • @equalizer22_
      @equalizer22_ Год назад

      @@PortfolioCourses I didn’t read correctly my bad

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

    many thanks, subscribed

  • @adityamishrasc2579
    @adityamishrasc2579 2 года назад +1

    Not a problem for people who started programming with C language.

    • @PortfolioCourses
      @PortfolioCourses  2 года назад +2

      I agree. 🙂 I've noticed teachers will assign Python questions like this to their students to help them understand a lot of the "basic algorithms" that we get automatically in Python with functions like max().

    • @user-tz2zz5ij1s
      @user-tz2zz5ij1s 2 года назад

      Python is the big language to learn now. It’s what is taught in the freshman introduction engineering classes in college. But it is taught with the restrictions of not being allowed to use the built in functions. Any university taught student doesn’t get the luxury of all those built in functions. Hence why I am here for a refresher.

    • @PortfolioCourses
      @PortfolioCourses  2 года назад

      @@user-tz2zz5ij1s I've noticed the exact same thing. Teachers still want students to learn "the foundations" so they'll restrict usage of these sorts of functions that do things automatically. 🙂

  • @vinhvuveo
    @vinhvuveo Год назад

    why my max is always = list[0] = 3 ?

    • @PortfolioCourses
      @PortfolioCourses  Год назад

      The code for this video is here: github.com/portfoliocourses/python-example-code/blob/main/find_max.py. That code should not always give you a max of list[0] = 3. :-) I'm not sure why your code would do that, but it sounds like something is incorrect about the way the algorithm is implemented. Maybe you can compare your code to this code and find the difference. It could be something small like a variable name or spacing issue.

    • @vinhvuveo
      @vinhvuveo Год назад

      @@PortfolioCourses u know what, i am wrong between '=' and '=='

    • @PortfolioCourses
      @PortfolioCourses  Год назад +1

      Oh that makes sense, I'm glad you figured it out! :-)

  • @staacademy611
    @staacademy611 Год назад

    1:39

    • @PortfolioCourses
      @PortfolioCourses  Год назад

      Is there something about this point in the video you wanted to point out? :-)

    • @staacademy611
      @staacademy611 Год назад

      @@PortfolioCourses No it is the code. 😉

    • @PortfolioCourses
      @PortfolioCourses  Год назад

      Oooh I see haha, there is a link in the description to the code too, just so folks know! :-)

    • @staacademy611
      @staacademy611 Год назад

      ​@@PortfolioCourses Ok thank you I subscribed your channel.😃

    • @PortfolioCourses
      @PortfolioCourses  Год назад

      @@staacademy611 Awesome, welcome aboard! 🙂