Professional Documents
Culture Documents
1. Having in mind the software development life cycle (SDLC), when are software errors the least
costly to correct?
• During implementation
• During maintenance
• During development
• During requirements analysis
v) every week
w) after the software has changed
x) as often as possible
y) when the environment has changed
z) when the project manager says
SQL
8. Write a SQL statement to display the order number followed by order date and the purchase
amount for each order which will be delivered by the salesman who is holding the ID 5001,
ordered starting with the oldest one first. Table name is 'orders'
9. Write a SQL statement which selects the highest grade for each of the cities of the customers.
Table name is 'customer'
SELECT city,MAX(grade)
FROM customer
GROUP BY city
10. Write a SQL statement to prepare a list with salesman name, customer name and their cities
for the salesmen and customer who belong to the same city (also, rename the columns to have
suggestive names). Use 'salesman' and 'customer' as tables.
UPDATE customer
SET grade =250
WHERE city =New York
12. Delete all data from rows that have the grade 200 or less. User ‘customer’ table.
Pseudocode
13. Write a pseudo code to replace every third element in the array with the value 10. Assume
that an array filled with 20 different values is already provided.
var = [1.....20]
for(i=1;i<=array.length;i++)
{
if(i%3==0)
{
array[i]=10
}
14. Write the algorithm for recursive Fibonacci.
functionFibonacci(n)
{
if(n<=1)
{
return n;
}
else
{
return fibonaci(n-1)+fibonacci(n-2);
}
Logic
15. Alice, Brie, Carlos and Drake are in a footrace. They have numbers pinned on their shirts: #1
to Alice, #2 to Brie, #3 to Carlos, and #4 to Drake.
When the race ends, none of them place in the same place as their pinned number. Also, Brie
finished ahead of Drake, and Carlos finished ahead of Alice.
Based on this, who placed 3rd?
Drake
API