All 3 systems (functions, programs, and distributed services) all rely on
taking arguments/inputs (whether simple or complex) and passing them
through computer code to give some type of output.
Also each level relies on the previous level, so programs contain
functions, and distributed services contain programs which contain
unctions. The biggest difference is the scale on which they are used,
functions being the smallest and distributed services being the largest.
I removed the
else:
return None
and replaced with
return None
as discussed on Discord. I checked the code with test_friend_functions.py
and it all still works.
Submitting for some help on the weather.py file. It is not printing the
help for me nor letting me input a location with -h or -l as I mentioned
on Discord.
Feeling relieved to have gotten all the functions working. I had one l
ast problem and after posting to Discord and was actually able to figure
it out myself (somehow seeing it in the message board instead of the
terminal made it more obvious, I ended up deleting the post from Discord
since it was super specific).
I found this part of the lab to be kind of challenging as it was not
very straightforward and was somewhat frustrating at times. I feel
like a bit more documentation or background on dictionaries could have
helped, but I was ultimately able to solve the problem by searching
online and trying to think each line through. It also took me a while
to realize we were using a list of dictionaries and keeping that in the
front of my mind helped me get past the final issues I was having.
I think I got this function working, but it's difficult to decipher the
error messages in the test_friend_functions program. I'm going to attempt
the last function and then revisit anything that is still giving an error.
I found this function a bit easier to work with after I had some trouble
with the previous ones. The lines I added at the end are proving very
useful to testing the functions and understanding how they work.
I added some helper print statements at the end of friend_functions to
help me test. Had an indentation error with the else statement that got
me stuck for a while but is resolved now.
Not sure what is going on here, but I was able to decipher the error
message that it is not reading 0 for when the "favorite colors" list is
empty. I'm just not sure what it is not reading 0 and I've tried a few
other things too with the same result. Going to move on for now and come
back to this later.
I think I got the get_email function working here (I have 2 dots) but am
still getting one F as the result of the testing section. If this
function still has an error, I can come back and fix it before
completing checkpoint 1.