Confused on how to get something to show up

Probably, please try correcting your indentation for if-else statement in the first code and see if that solves the problem. You could also setup print command in the first code to trace how it operates.