Question: how types affect execution, part 2 Here is the same program, with different starting values for the data list. # assume Python 2 data =

 how types affect execution, part 2 Here is the same program,
with different starting values for the data list. # assume Python 2
data = [ 1, 2, 3 ] total average = @ n

how types affect execution, part 2 Here is the same program, with different starting values for the data list. # assume Python 2 data = [ 1, 2, 3 ] total average = @ n = 0 for value in data: n += 1 total += value average total print "average:", average Now what averages are printed? = 1,1,1 O 1, 1, 2 1,1.5, 2 1,2,2 error before the program starts error while the program is running kinds of error checking Let's try some examples of buggy code and see how they behave in Java. Are these bugs caught statically, dynamically, or not at all? int n - 5; if (n) { n = n + 1; 7 static error dynamic error no error, wrong answer Submit kinds of error checking, part 2 int big - 200000; // 200,000 big - big big; // big should be 4 billion now static error dynamic error no error, wrong answer reading javadocs After we run this code: Map treasures = new HashMap; treasures.put("beach", 25); Integer result = treasures.put IfAbsent ("beach", 75); What is result? 25 75 another integer null

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!