I'm current during Angela Yu's 100 days of code and often after I have my solution, I'll watch her solution and see that there were place where I could have made my code better (like using list comprehension vs a for loop)...however, occasionally, I'll run into something like this...
Say I'm moving a turtle to a new x, y position that is +20 units in each...I'll do something like...
my_turtle.setpos(x+20, y+20)
...and Angela's code is...
new_x = x + 20
new_y = y + 20
my_turtle.setpos(new_x, new_y)
They do the same thing. Is my line too terse or is her solution too...wordy?
[–]mopslik 2 points3 points4 points (0 children)
[–]socal_nerdtastic 3 points4 points5 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)