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.


0 0
Add a comment Improve this question Transcribed image text
Answer #1

(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

Add a comment
Know the answer?
Add Answer to:
5. 122 pointsl the following information about computer program Given here is an undeclared variable there...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hey all, if you could create a java program following these guidelines that would be much...

    Hey all, if you could create a java program following these guidelines that would be much appreciated. helpful comments in the program would be appreciated :) The idea of this program is as followes : A password must meet special requirements, for instance , it has to be of specific length, contains at least 2 capital letters , 2 lowercase letters, 2 symbols and 2 digits. A customer is hiring you to create a class that can be utilized for...

  • Edit a C program based on the surface code(which is after the question's instruction.) that will...

    Edit a C program based on the surface code(which is after the question's instruction.) that will implement a customer waiting list that might be used by a restaurant. Use the base code to finish the project. When people want to be seated in the restaurant, they give their name and group size to the host/hostess and then wait until those in front of them have been seated. The program must use a linked list to implement the queue-like data structure....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT