 # CIS 155 CIS155 Week 2 Quiz Answers

soffix

• \$5.99

1. (TCOs 2, 3) What symbol would be used in a flowchart for the following statement?
discount = price * .05
2. (TCOs 2, 3, 8) Assume that the variables num and rate
are integer variables, and dept is a string variable. Which of the following assignment statements is invalid?
3. (TCOs 2, 3, 8) What is the final value of y at the end of these statements?
x = 5
y = 2 * x
y = y + 1
4. (TCOs 2, 8) Write a valid assignment statement for the following: Multiply x by 2 and store the result in z.
5. (TCOs 3, 8) Evaluate the following expression.
30 MOD 4
6. (TCOs 3, 8) Evaluate the following expression using the values x = 10, y = 5, and z = 3.
x
MOD y + z
7. (TCOs 2, 3, 8) List the inputs and outputs and write the psuedocode to solve the following problem (8 points): The program will prompt the amount of a bill in a restaurant and the percentage tip to leave (input 10 for 10%). The program will calculate and display the amount of the tip.

Sale

Unavailable

Sold Out