Search for tag: "yield"

Zoom Dec. 8. Coroutines

Generators may seem like a weird detour for this late in the course. But in this presentation, we show how they are used in graphics and animation.Generators are a specific example of a concept known…

From  Hannah Lee on December 10th, 2020 11 plays

Lesson 29.8 Native Coroutines (OPTIONAL)

This video introduces an advanced topic that is completely optional and is not relevant to the final assignment. If you Google Python and coroutines, you will get something very different than what…

From  Hannah Lee on December 3rd, 2020 10 plays

Lesson 29.7 Time Budgeting (OPTIONAL)

This video is not optional because the material is advanced. It is optional because it is not relevant for the final assignment. However, you may be interested in this video if you want to see…

From  Hannah Lee on December 3rd, 2020 11 plays

Lesson29.6 Animation Coroutines

Just as it was hard to design iterators with classes, it is also hard to design timed animation with classes. In this video, we show how to use coroutines to make animation design so much simpler.

From  Hannah Lee on December 3rd, 2020 29 plays

Lesson 29.4 The yield Statement

While generators are coroutines, the communication only goes one way: from the child to the calling parent. In this video we show how to reverse this communication, passing down information from the…

From  Hannah Lee on December 3rd, 2020 35 plays

Lesson 29.3 Generators Revisited

In the previous video, we said that generators are a type of coroutine. In this video, we explore this idea. We use yield statements to write generators that are a little more sophisticated than…

From  Hannah Lee on December 3rd, 2020 34 plays

Lesson 28.5 Generator Design

Now that we know how generators work, it is time to write our own. In this video we show how easy it is. We just take out experience with the accumulator pattern and replace the accumulator with a…

From  Hannah Lee on December 3rd, 2020 25 plays

Lesson 28.4 Generator Visualization

Generators look like normal functions, but they do not behave like them. In this video we show how to visualize them, using the Python Tutor.

From  Hannah Lee on December 3rd, 2020 23 plays

Lesson 28.3 The yield Statement

Making iterator classes is hard. In this video, we show an alternative, allowing us to write the iterator as a ‘function”. This requires the addition of a new python statement, the yield…

From  Hannah Lee on December 3rd, 2020 26 plays

Eastern Viticulture and Enology Forum: Sources and Sinks: How viticultural practices modify carbon assimilation and allocation.

Presenters are Cain Hickey, statewide viticulture extension educator, Penn State, and Tim Martinson, senior extension associate, Cornell AgriTech. Zoom Recording ID: 92866222037 UUID:…

From  Tim Martinson on November 18th, 2020 162 plays

Advances in Agricultural Analytics and Digital Agriculture

From  Jennifer Shipe on July 29th, 2019 43 plays