正在加载图片...
Demo Evaluation vs Apply def a_plus_bc(a,b,c): I II I >>> a-p1us_bc(2,3,4)#2+3*4 14 Apply operator How many frames are a_plus_bc function to created? n operand 4,3,81. In what order? a_plus_bc(square(2),3,square(square(3))) Apply operator Apply operator square function to Apply operator square function to operand 2. square function to operand 9. operand 3.Evaluation vs Apply def a_plus_bc(a, b, c): """ >>> a_plus_bc(2, 3, 4) # 2 + 3 * 4 14 """ bc = b * c a_plus_bc(square( return a 2+ ), bc 3, square(square(3))) Demo How many frames are created? In what order? Apply operator square function to operand 2. Apply operator square function to operand 3. Apply operator square function to operand 9. Apply operator a_plus_bc function to operand 4, 3, 81
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有