P.S: This is just a study guide. The questions may not appear exactly like this.
1- What symbol would be used in a flowchart for the following statement?
Display sum
• Parallelogram
• Diamond
• Rectangle
• Rounded rectangle
2- Assume that the variables num and rate are integer variables, and dept is a string variable. Which of the following assignment statements is invalid?
• 25 = num
• num = rate
• dept = “sales”
• All of the above are valid.
3- What is the final value of y at the end of these statements?
x = 10
y = x – 3
y = y + 1
4- Write a valid assignment statement for the following: Add xand y and store the result in sum.
5- Evaluate the following expression.
20 MOD 7
6- Evaluate the following expression using the values x = 10,y = 5, and z = 3.
xMOD y + z
7- List the inputs and outputs and write the psuedocode to solve the following problem (8 points): The program will prompt the user for the length and width of a room. The program will calculate and display the area of the room.