The Python return Statement: Implicit and Explicit return

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

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

  • @pile333
    @pile333 3 года назад +2

    Very clear.

  • @mrjt6404
    @mrjt6404 3 года назад

    Thank you so much
    what would return -1 do ???

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

      you can use return -1 to make a function which can change the sign of a number if you multiply by -1. like change_sign() * 5 would give you -5 and an input of -3 will give you 3

  • @15youngblack
    @15youngblack 2 года назад

    I'm confused about when you start to bring up list comprehension. num%2 for an even number is 0, which is what we want. So why is that not enough to satisfy the equation?

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

      I wish they explained this as well. I feel like it was just, "type in "not" and your good to go, w/o an explanation as to why"

  • @AhmedMWafi-ds5do
    @AhmedMWafi-ds5do 2 года назад

    Great videooooo

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

    Really wish expanations of why to place not, what is the for, in and if statements etc. Rather than just "do this because it works". idk something more in depth and explains certain things rather than, b/c it is 0 we need the Not operator sos type in not. okay so? thatdoesnt teach me anything.

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

    confusing for a beginner