Uncategorized
Home > Uncategorized (Page 18)
Posted at 15:20h
in
Uncategorized
by admin
Question:
Continue with the pygame application. Write code to do the below tasks:
Write code for the missile sprite, same as the player sprite
Make sure the missile moves up the screen when the player hits the space key on the keyboard.
The missile should appear...
Posted at 15:18h
in
Uncategorized
by admin
Question:
Create a new flask application or continue with the old one. Make a calculator to the BMI using a flask. Make an html file which contains the form to input the height and weight of the person in meters and kilograms. Then based on the...
Posted at 17:31h
in
Uncategorized
by admin
Question 1:
You are in a bike race which goes up and down a hill. You could create two variables: uphillDistance and downhillDistance give the distance (in km) of both parts of the race. Write a program that will print out the total distance for the...
Posted at 03:25h
in
Uncategorized
by admin
Question:
Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees. If the same thing happened to binary trees, how large would the piles of leaves...
Posted at 23:55h
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 01:56h
in
Uncategorized
by admin
Question:
You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path is the sum of...
Posted at 03:58h
in
Uncategorized
by admin
Question:
Create a new flask application which has the below routes
Add route GET /divide wherein take the two numbers and return the division of those two numbers. If the number entered in the get parameters are not number, return a message saying “Invalid input”
Add...
Posted at 03:56h
in
Uncategorized
by admin
Question:
Continue with the code in the previous class, add code such that if the score reaches 50, then display text saying that the “Game is Over”, do not display any sprites along with the Game over test. Please use the below gif image as a...
Posted at 19:19h
in
Uncategorized
by admin
You could do the following homework using IDLE
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display...
Posted at 18:01h
in
Uncategorized
by admin
Question:
Create a new flask application or use the existing flask application to create a new route called /reverse which will reverse the string. Use the GET request in the /reverse route, to get a string using the GET request and reverse it.
...