online exsam
TABLE 6
Sarah Stamm
Andrew Smith
George Denillo
Kevin Henry
Jerry Hill
7-3 What does this algorithm do? Adding 2 to the current number 10 times.
Assumptions: The user provides a positive integer.
Input: A number from user.
Output: Some result.
1. Input number from user.
2. Set count to 1.
3. While (count <= 10)
a. Set current # to # + 2
b. Set count to count + 1
4. Display current # to the screen
7-13
Create an algorithm to describe new balance after 10 transactions at new restaurant.
Assumptions: Balance never goes negative.
Step 1: Get initial balance
Step 2: Ask if there are more transactions. If not, go to step 6.
Step 3: Get transaction.
Step 4: Set balance to balance + transaction.
Step 5: Go to step 2.
Step 6: Display overall balance.
9-5
What would this SQL statement output?
Select * FROM “LOCATION”
Output: All the fields in the location table would be selected.
9-8
Which customer(s) live in Georgia (GA)? List by name.
Table name is customer, check c_state attribute to locate matching state, returns c_id # 5 (Sheila Lewis)