https://www.dfrobot.com/product-1121.html
These can be bought from just about any electronics website.
The robot follows a random walk with a constant forward velocity and white noise as angular acceleration.
Continuously check if the bumper has been pressed in a while loop (dont forget to initialise the bumper before the while loop starts - sometimes the default can be true for bool and causes frustration).
When it has been pressed, do an evasive manouver - basically reverse a little, turn at some random angle, and go back to driving randomly.
DF Robot Mini MP3 player takes care of this: simply load your swear sounds onto an SD card and "play next" swear.