[Tutor] Attribution Error
Alan Gauld
alan.gauld at yahoo.co.uk
Fri Apr 17 20:00:22 EDT 2020
On 17/04/2020 23:59, Alan Thwaits wrote:
> Can you give me an example of "insert print statements after each
> current_scene assignment"?
I already did. They are in the code below...
>>> class Engine(object):
>>> def play(self):
>>> current_scene = self.scene_map.opening_scene()
>> print("Current scene: ", current_scene)
The line above is a debug print statement.
>>
>>> last_scene = self.scene_map.next_scene('finished')
>>>
>>> while current_scene != last_scene:
>>> next_scene_name = current_scene.enter() << line 59
>>> current_scene = self.scene_map.next_scene(next_scene_name>> print("Current scene: ", current_scene)
And so it the one above here...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list