Download presentation

Presentation is loading. Please wait.

Published byAnastasia Heslop Modified over 2 years ago

1
G make_counter params: body: count = 0 def counter():... my_counter params: body: count += 1... E1 count0 counter E2E2

2
G make_counter params: body: count = 0 def counter():... my_counter params: body: count += 1... E1 count0 counter E2E2 count?

3
G make_counter params: body: count = 0 def counter():... my_counter params: body: nonlocal count... E1 count0 1 2 counter E2E3

4
G make_counting_fn params: fn body: count = 0... E1 count0 params: x body: return x * x square params: arg body: nonlocal count... counting_fn counting_square fn

5
G make_counting_fn params: fn body: count = 0... E1 count0 1 2 params: x body: return x * x square params: arg body: nonlocal count... counting_fn counting_square fn E2 arg7 E3 x7 E5 x3 E4 arg3 sq_749 sq_39

6
G make_pair params: first, second body: def pair(msg):... E1 first1 pair params: msg body: if msg == ‘first’:... my_pair second2

7
G make_pair params: first, second body: def pair(msg):... E1 first1 pair params: msg body: if msg == ‘first’:... my_pair second2 E2 msg ‘first’ E3 msg ‘second’

8
G make_pair params: first, second body: def pair(msg, arg=None):... E1 first1 pair params: msg, arg=None body: nonlocal first, second... my_pair second2 E2 msg ‘first’ E4 msg ‘first’ E3 msg ‘set-first’ arg None arg None arg 5

Similar presentations

Presentation is loading. Please wait....

OK

Skip Counting Counting by 2, 5, and 10.

Skip Counting Counting by 2, 5, and 10.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on euclid geometry for class 9 download Ppt on boilers operations Ppt on m commerce Ppt on tunnel diode operation Ppt on south african economy Ppt on traffic light controller project 64 Ppt on new zealand culture facts Ppt online compressor sales Convert pdf to ppt on mac Download ppt on acids bases and salts class 10