Wednesday, October 1, 9:30-10:45am, PM 103
Test 1 will cover all material from the beginning of the semester through lazy evaluation. This material includes everything discussed in lectures and covered in assignments, and aligns with chapters 1-6 from the recommended text. We have covered some additional topics the text has not, and we did not cover the data science additions to each chapter. Because this is a programming principles course, there will be questions related to principles as well as questions that involve syntax. You may be asked to write, analyze, and/or debug code.
int[3] output;
float[] arr = [1.2, 3.4, 5.6];
for(int i = 0; i < arr.length; i++) {
output.add(arr[i] ^ 2); // squares value
}f that takes the parameters
a, b, and c, but not necessarily
in that order, and returns a + b - c, if
f(5,0,100) returns 95, what is the
first argument (letter)?mylist.sort() and
sorted(mylist)? d = [2,3,5,7]
output = []
for i in d:
output.append(i ** 2)i >= 0 and j < 10? Why does this involve lazy
evaluation?