Question:
A fish-finder is a device used by anglers to find fish in a lake. If the fish-finder finds a fish, it will sound an alarm. It uses depth readings to determine whether to sound an alarm. For our purposes, the fish-finder will decide that a...
Question 1:
Create a loop between 1 to 20.
Print “fizz” if the number is divisible by 3
Print “bizz” if the number is divisible by 5
Print “fizzbizz” if a number is divisible by both 3 and 5.
Otherwise, print the number itself.
Hint:
You could use...
Question:
Continue modify the program in the last class, if your fighter touches the enemy or enemy's bullet:
the fighter will explode
the game status will be STATUS_GAMEOVER
when game over, everything will not show on the screen except for the background and planets.
...
Posted at 03:53h
in
Uncategorized
by admin
Question:
A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal node. It then keeps moving down, either follows the path of the left subtree, or...
Question:(You could use stack to solve the problem)
Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends...
Posted at 03:35h
in
Uncategorized
by admin
Question:
In the previous class, we wrote the code to display the image on the screen. We also modified the code to move the image to the right. The code for displaying the image is as below. Modify the below code, to bounce the image in...