Open jmcrey opened 6 years ago
That all makes sense! I'm always so nervous about using += incorrectly write it explicitly it out with Thing= Thing+New thing. But += is so much cleaner. Thank you for the clarification of >= verses = based on the problem statement!
We can clean this up a little bit using the
+=
andelse
operators. Also, we want to continue to make use of spaces in our code to enhance user readability. Here is the code just a little bit more cleaned up.Try to practice this same approach by cleaning up the last
for
loop of the function!One last note: we only want to add the value should table1's value be greater than table2's value. So, we want to change our operator from
>=
to>
. All those values that are equal to will get added toappearances
at the end. So, our finished produce will be: