Page 1 of 1

10) Bellow we define the functions 'apply(h,x_table)' and 'build_data(x,y)'. Explain what these functions do. (3 marks)

Posted: Fri Jul 08, 2022 6:37 am
by answerhappygod
10 Bellow We Define The Functions Apply H X Table And Build Data X Y Explain What These Functions Do 3 Marks 1
10 Bellow We Define The Functions Apply H X Table And Build Data X Y Explain What These Functions Do 3 Marks 1 (178.03 KiB) Viewed 45 times
10) Bellow we define the functions 'apply(h,x_table)' and 'build_data(x,y)'. Explain what these functions do. (3 marks) [ ] # Do not edit or delete this code def apply(h, x_table): y_table = [] for x in x_table : y_table += [ h( x ) ] #end_for return (y_table) #end_def def build_data( h, x_table ) : return [x_table apply( h, x_table ) ] #end_def 3