Author: admin
Home > Articles posted by admin (Page 134)
Question:
Write code to do absolute sort with the following condition
Sort an array according to its absolute value. Please refer to this link https://en.wikipedia.org/wiki/Absolute_value if you don’t know what absolute value is
If the array for a specific number contains both its negative form and...
Question:
Continue with the code in the previous class, make sure when the circle moves out of the screen from the left side, it appears again from the right side. Similarly if the circle moves out from the top, it appears again from the bottom. Please...
Posted at 00:25h
in
Uncategorized
by admin
Question:
Continuing with the code in the previous class we added the bullets to the game but the bullets are not moving towards the top.
Modify the update function inside the Missile class so that the missile moves towards the top when we hit the space key
The...
Posted at 01:30h
in
Uncategorized
by admin
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.
Question 2:
Continue modify...
Posted at 14:35h
in
Uncategorized
by admin
Question 1:
Please using easygui to create the program we made in the class. The enter box will ask you password, if you get the right password, the msgbox will display ‘FBI Access granted’
Question 2:
Create a simple number guessing game. The computer will ask the first...
Posted at 14:29h
in
Uncategorized
by admin
Question 1:
A store is having a sale. They’re giving 10 percent off purchases of $10 or lower, and 20 percent off purchases of greater than $10. Write a program that asks the purchase price and displays the discount (10% or 20%) and the final price.
Sample Input...
Posted at 02:53h
in
archives
by admin
Question 1:
We have learn how to make the picture bounce from left to right and right to left. Please make change of the program we made in the class to make the picture bounce up and down as well.
Hint: We made a variable named ‘xspeed’ to...
Posted at 02:47h
in
Uncategorized
by admin
Question:
Modify the program we made in the class to:
Create Enemy class
Add one enemy spaceship to your program
The enemy spaceship will keep moving from left to right and right to left side of the screen.
...
Posted at 02:45h
in
Uncategorized
by admin
Question 1:
Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
You probably used a for loop in your program in last homework. That’s how most people would do...
Posted at 02:43h
in
Uncategorized
by admin
Question 1:
Write a program to print a multiplication table (a times table). At the start, it should ask the user which table to print. The output should look something like this:
You probably used a for loop in your program in last homework. That’s how most people would do...