For a banana, I'd take the leftover portion and freeze it (peel, break into pieces and put in a freezer bag), then use it in a smoothie. (Frozen bananas are a staple in my kitchen).
For an avocado, I do a combo of the previous two methods: I put a bit of lemon or lime juice on it to help prevent browning, and keep the pit with it. It also helps to save the shell part from the half you ate, and close the avocado back up again with it.