Professional Documents
Culture Documents
LOGIC
1. If a clock strikes once at 1 o′clock, twice at 2 o′clock and so on,
How many times will it strike in a day?
2. A snail is at the bottom of a 30 foot well. Every hour the snail is able to climb up 3 feet,
then immediately slide back down 2 feet. How many hours does it take for the snail to get
out of the well?
3. I live on Sunset Boulevard, where there are 6 houses on my side of the block. The
house numbers are consecutive even numbers. The sum of all 6 house numbers is 8790.
You don't know which block I live on, and it's a long street, but I will tell you that I live
in the lowest number on my side of the block. What's my address?
4. A man needs to cross a river in a canoe. With him, he has a bag of grain, a chicken, and
a fox. He can only carry one of the three at a time. If he leaves the grain and the chicken,
the chicken will eat the grain. If he takes the grain, the fox will eat the chicken.
How does he successfully cross the river with his load?
MySql
1. what is the difference between InnoDb and MyIsam?
LOCATION
Location_ID Regional_Group
122 NEW YORK
123 DALLAS
124 CHICAGO
167 BOSTON
DEPARTMENT
Department_ID Name Location_ID
10 ACCOUNTING 122
20 RESEARCH 124
30 SALES 123
40 OPERATIONS 167
JOB
Job_ID Function
667 CLERK
668 STAFF
669 ANALYST
670 SALESPERSON
671 MANAGER
672 PRESIDENT
EMPLOYEE
EMPLOY LAST_NA FIRST_NA MIDDL JOB_ID MANAGER HIREDA SALA CO DEPARTMENT
EE_ID ME ME E_NAM _ID TE RY MM _ID
E
2. List out the employees annual salary with their names only.
3. List out the employees who are working in department 10 and draw the salaries more
than 3500
4. List out the department name, maximum salary, minimum salary, average salary of the
employees
5. Display all employees in sales or operation departments.
PHP/JS/Golang
1. Write a program that prints the numbers from 1 to 100. But for multiples of three print
“Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers
which are multiples of both three and five print “FizzBuzz”.
2. Create a function to receive an integer input from user which translates to string
currency.
Example:
function convert($input) { // 123456
return $output; // one hundred twenty three thousand four hundred fifty six
}
3. Create a multiply function without * operator
Example:
function multiply($a, $b) { // a = 5, b = 4
return $result; // 20
}