A few remarks:
- Sleep duration is hard coded, it can be automatically calculated (depending on the text length).
- Display can be a function (including the sleep function).
- So you can just pass the string, it prints and waits.
- Instead of comparing the user input to Yes, yes and YES, you can simply compare the uppercase’d input to YES.