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

5. 122 pointsl the following information about computer program Given here is an

ID: 3801731 • Letter: 5

Question


5. 122 pointsl the following information about computer program Given here is an undeclared variable there is a Wntaxerror in the first five lines is Ymakerror in the first fi s there is a ssing semicolon or a variable misspeled There is not a missing semicolon misspelled variable name (al Fill in the blank in e to complete the above areument by finding the mistake of the program. (b) write down the argument form, specify the meaning of each use symbaisto rewrite the argument symbol. use reference rule or truth table to prove that the argument is valid.

Explanation / Answer

(a) it says that in your program, in the first five lines -

              i. there is either a missing variable.

              ii. or syntax error - it further says that if their is a syntax error - 1. there is a mispelled variable or 2. a semicolon is present.

             it further says that 1. and 2. are not present.

therefore, for their to be an error after this, then condition i. must hold!

so e. will be - there is an undeclared variable!

-------------------------

(b)

let P = there is an undeclared variable.

let Q = there is a syntax error

then P OR Q = True (given from first line)

but Q = X OR Y where X = there is a mispelled variable Y = a semicolon is present.

given, X = false Y = false

therefore, Q = false

but we know P OR Q = True

hence P must be True

but P = there is an undeclared variable.

therfore line e is there is an undeclared variable.

--------------------------------------

(c)

i have already given the true false values in (b) for the true case, construct for the other cases accordingly.

-------------------------------------

thank you

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote