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
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?
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.
Very clear.
Thank you so much
what would return -1 do ???
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
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?
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"
Great videooooo
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.
confusing for a beginner