Quiz #3

This quiz deals mostly with questions from chapters #1, #2,and #3 in the text and from class room notes and examples. If the answer on a T/F is False, please correct or explain.

Question #1: What are the three basic structures of a program?

Question #2: When you look at a flowchart you see yes and no as the two decisions. Lets say the question is is the month = October. If the answer is yes you want to display a message saying "the leaves are turning". If the answer is no you want to display a message saying "not October". Write this decision using pseudocode.

Question #3: True of False: ANDs are evaluated before ORs which means that the expression condA AND condB OR condC will be evaluated as condA AND condB must both be true or just condC must be true.

Question #4: True or False: ANDs are evaluated before ORs which means that the expression condA AND condB OR condC will be evaluated as condA must always be true and in addition either condB OR condC must be true.

Question #5: True or False: ANDs are evaluated before ORs, but the order can be changed using parenthesis which means that the expression condA AND (condB OR condC) will be evaluated as condA must always be true and in addition either condB OR condC must be true.

Question #6: In the pseudocode statement or programming statement rslt = rslt + amt the = is called ___________________.

Question #7: If you want to compare two things for equality, how would you write the statement in JavaScript.

Question #8: In the statement totAmt = totAmt + amt if the totAmt contains the value 17 and amt contains the value 24 before the statement is executed, what will totAmt be after the statement is executed.

Question #9: A statement that gets the first input value in the program or if you are reading a file, the first record in the file is called a ____________________.

Question #10: The book discusses several reasons for using good structure when you write a program. These reasons are: _______________________________.