Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. (10 pts) Two common types of errors in computer programs are syntax errors an

ID: 3060422 • Letter: 1

Question

1. (10 pts) Two common types of errors in computer programs are syntax errors and logic errors. For a particular programming exercise in an introductory programming course, the instructor knows that 25% of students have syntax errors in their first try at writing the code, 34% have logic errors, and 58% have neither type of error. For the following questions, use good notation and show your work. a) (3 pts) What proportion of students have at least one kind of error? b) (4 pts) What proportion of students have both kinds of error? c) (3 pts) Given that a student has at least one kind of error, what is the conditional probability that he/she has both kinds of errors?

Explanation / Answer

a) P( students have at least one kond of error)

= 1-0.58

= 0.42

b) P( Have both errors)

= 0.25+0.34-0.42

= 0.17

c) P( Both errors/At least one error)

= 0.17/0.42

= 0.4048