learn python the hard way exercise 41 help -


O people, I do not understand anything at the runner up or afterwards.

Thanks

  Exit System Import Random Exit Random DF Death (): quips = ['You died, you suck a little. ',' Your mother will be proud of you, if she is smart. '' There Lusr 'is a little puppy to me which is better for you' Print Quit [Randint 0, len (thing) -1)] exit (1) Diif princess _ Liws_ here (): print " You see a beautiful princess with a bright crown. ' Print 'He gives you some cakes.' Eat_it = raw_input ('& gt;') If eat_it == 'eat it': Print 'you blast like a pins full of fleets.' The prints' Princess cackles and frogs eats wow! 'Return' death 'Alif eating IIT ==' Do not eat it ': Print' He throws the cake for you and it is cut into your head 'print', the last thing is that he is eating his torso Wow! 'Return' Death 'Elif's eating IIT ==' Eat him ':' Print 'he screams because you drag the cake into his mouth.' Print 'then he smiles and cries and thanks for saving her.' Print 'he points to a small door and says,' Anyone needs a cake. '' Print 'gives you a sauce of last cake.' Return 'gold_koi_pond' Other Print 'princess looks confused and cake' return 'princess_lives_here' def gold_koi_pond (): print 'There is a garden with a pond in the center. " Print 'You walk and get a huge feather out.' Print 'Peeking in you and a huge scary one looks at you.' Print 'This opens up mouth waiting for food.' Feed_it = raw_input ('& gt;') If feed_it == 'this feed': print 'someone jumps, and instead of eating the cake, your hand' print 'eats you and you eat' print ' Then they are pipe after some time later. 'Return' Death 'Elife feed_it ==' Do not feed it ': Print' Any grimace, then be beaten around for each other. ' Print 'It goes to the other end and borders itself against the wall ...' print 'then * it * lunges out in the water, air and in your' print 'whole body, cake and all. Print 'then you are thrown out after a week' return 'death' alif feed_it == 'throw it away: the print' jumps, then jumps in the air and eats it. 'Print' you can see it happy, it grunts, thrash ... 'print' and rolls in the end and a magic diamond goes into the air. ' Print 'on your feet.' Return 'Bears_Specialty_word' and: Print 'Somewhat, Concerned.' Return 'gold_koi_pond' def bear_with_sword (): 'The printed surprised, you are about to take the diamond on the verge of fish, when "print" a bear that moves a load-bearing sword ... "Print" Hey, where can you get it? 'Print' keeps it paw out and looks at you. 'Give_it = raw_input (' & gt; ') if give_it ==' give it ': print' diamonds To catch the 'bear' swipe in your hand and close your hand in the 'print' process. The bloody sees the print on the stumps and says, "O fuck, sorry about it." Print 'It tries to return your hand, but you fall.' Print 'The last thing you see is a bear skirmish and eats you.' Return 'Death' Alif give_it == 'Do not say': The print 'bear is feeling shocked.' Anyone ever a '' not '' with a bear print 'tolf.' Ask it, 'print' "That's why Because it is not a katana? I can get one! "'Print' then runs it and you see a large iron gate. Where did the 'print' come from? 'You say.' Return 'big_iron_gate' Other Print 'Bear go to big iron gate for you and you feel surprised it handles that notice' return big_iron_gate (): What is def big_iron_gate () 'return' that you Open_it = Raw_input ('& gt;') if open_it == 'Open it': Print 'You open it and you are free!' Print 'are mountains! And Jamun! And ...' Print 'Oh, but then the bear catches your hardships and kills you.' Print ', which are now laughing?' 'This hardcore love!' 'Return' death 'and' that does not look good 'room = { "death": death, Princess _ Liws_yhaan' Rajkumari_viwah_yhaan ': Gold_koi_pend,' Big_air__get ': Big_air__get,' Biyr_vi_s_sward 'Balu_viseshtaan} DEP runner (map, start): Next = Start While True: Room = Map [Next] N '\ n ----------- -' Next = rooms () runners (ROOMS, 'princess_lives_here')    

in Python, functions are first-class, so ROOMS object object string names to the actual function. runners have passed this map, and a start string. While in the loop, we get the next function, cell , and call it ( cell () ). It executes, returns a string that has the front waist Will, and continues (until finally call a function exit

Comments