ENGINEER 1D04 Study Guide - Final Guide: Side Effect, Function Application, Firstclass

36 views2 pages
scarletotter976 and 37168 others unlocked
ENGINEER 1D04 Full Course Notes
4
ENGINEER 1D04 Full Course Notes
Verified Note
4 documents

Document Summary

The (cid:373)ethods defi(cid:374)e the o(cid:271)je(cid:272)t(cid:859)s (cid:271)eha(cid:448)ior: an accessor (also called a selector or getter) is a method that retrieves information about the state of an object. 2. formal and actual parameters are matched by position. 5. a function in python represents a mathematical function as a value that can be applied as a rule. P(cid:1005) p(cid:373) is (cid:272)alled formal parameters of the function definition, they represents the input to the function. When the function is called, they become local variables of the function call. Their value s are the inputs to the function. Their type must match the type of formal parameter when the application is evaluated. (cid:1005)(cid:1007). the e(cid:448)aluatio(cid:374) of a fu(cid:374)(cid:272)tio(cid:374) appli(cid:272)atio(cid:374) (cid:373)a(cid:455) (cid:272)ause the progra(cid:373)(cid:859)s state to (cid:271)e modified. Function application thus can be used as statements. (cid:1005)(cid:1008). a fu(cid:374)(cid:272)tio(cid:374) is e(cid:448)aluated i(cid:374) :(cid:1005). (cid:272)alli(cid:374)g progra(cid:373)(cid:859)s e(cid:454)e(cid:272)utio(cid:374) is suspe(cid:374)ded (cid:1006). for(cid:373)al parameters are bounded to actual parameters.