From the course: Python Practice: Real-World Coding Challenges
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Solution: Structuring scribes - Python Tutorial
From the course: Python Practice: Real-World Coding Challenges
Solution: Structuring scribes
(bright music) - [Instructor] So here's the solution I came up with. Keep in mind, yours doesn't have to look like mine. This was pretty open-ended. So as long as you had some sort of data structure that you could modify to control the scribes, you're good. I knew that I wanted an ordered list of scribes so that I could iterate through them, but I also wanted to set several parameters. So a list of dictionaries, like this one here, is probably a good bet. So I iterate through my list, instantiate and use ScribeObject, set those parameters, and then store the ScribeObject back in my original dictionary just to keep track of it. The instructions were a little more complicated, so my instructions look like this. Right here. You have a list of dictionaries describing the function and the duration or how many times I want to repeat that function. One of my goals was to have the scribes all move at the same time rather…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.