Uncategorized
Home > Uncategorized (Page 16)
Posted at 20:45h
in
Uncategorized
by admin
Continue with the pygame application. Write code to do the below tasks:
● Write code such that the enemy can shoot a missile towards the player. Also, make sure that the game is over when the player gets hits by enemy missile
● If you want you...
Posted at 17:47h
in
Uncategorized
by admin
Question:
Given the following table of data about several planets of our solar system, create a web page that enables users to enter a planet name and, at the click of a button, have the distance and diameter appear either in an alert box or (as...
Posted at 17:26h
in
Uncategorized
by admin
Question:
Create a new flask application or continue with the existing application. Create or use the below routes
/login -> use this route to login the user. You can use the /login route we created in the class as well.
/play which prints, “you are allowed...
Posted at 17:25h
in
Uncategorized
by admin
Question:
Continue with the pygame application. Write code to do the below tasks:
Create a new screen called the GameOverScreen which displays the text “Game Over. Press space to start game”
Make sure to transition to the game over screen, when the player is killed...
Posted at 16:52h
in
Uncategorized
by admin
Question:
A soccer team is looking for girls from ages 10 to 12 to play on their team. Write a program to ask the user’s age and if male or female (using “m” or “f”). Display a message indicating whether the person is eligible to play on the team.
Sample Input 1:
Age:...
Posted at 16:48h
in
Uncategorized
by admin
You can do Question 1~ 3 in Python IDLE:
Question 1.
Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number!
Question 2.
Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded up...
Posted at 20:54h
in
Uncategorized
by admin
Question:
There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can’t move on red tiles, he...
Posted at 20:48h
in
Uncategorized
by admin
Question:
Examine the following function definition. Can you spot any problems with the definition? If so, how can you fix the problems?
function format(ohmage)
{
var result;
if ohmage >= 1e6
{
ohmage = ohmage / 1e6;
result =...
Posted at 20:21h
in
Uncategorized
by admin
Question:
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 1:
How...
Posted at 20:17h
in
Uncategorized
by admin
You can do Question 1~ 3 in Python IDLE:
Question 1.
Use float() to create a number from a string like ‘12.34’. Make sure the result is really a number!
Question 2.
Try using int() to create an integer from a decimal number like 56.78. Did the answer get rounded up...