def checkcave(chosencave) print('you approach the cave ' time sleep( print('it is dark and spooky ' time sleep( print(' large dragon jumps out in front of youhe opens his jaws and ' print( time sleep( friendlycave random randint( if chosencave =str(friendlycave) print('gives you his treasure!' else print('gobbles you down in one bite!' playagain 'yes while playagain ='yesor playagain =' ' displayintro( cavenumber choosecave( checkcave(cavenumber print('do you want to play again(yes or no)' playagain input(how the code works let' look at the source code in more detail import random import time this program imports two modules the random module will provide the random randint(function like it did in the "guess the numbergame you will also want time-related functions that the time module includesso line imports the time module def statements def displayintro() print('you are in land full of dragons in front of you,'post questions to