Author: admin
Home > Articles posted by admin (Page 15)
Question:
Continue modify the program we made in the class:
create Shield class. A shield object will be created after the fighter is destroyed.
The shield will last for 3 seconds(90 frames) with animation
...
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...
Question:
Continue modify the program we made in the class:
Set fighter’s hp as 100
if the fighter received damage from enemy’s bullet, it will lose 10 hp.
if the fighter received damage from boss’ bullet, it will lose 20 hp.
please draw hp bar at...
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...
Question 1:
Numerous local and international recreational runners were eager to take part in this year’s Zagreb Marathon! It is an already traditional race 42125 meters long. A curious statistical info is that this year every single contestant managed to complete the race, except one.
Since marathons...
Posted at 23:38h
in
Uncategorized
by admin
Question:
Problem Description
You are trying to pass the time while at the optometrist. You notice there is a grid of four numbers:
1
2
3
4
You see lots of mirrors and lenses at the optometrist, and wonder how flipping the grid horizontally or vertically would change the grid. Specifically, a...
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 the following image (You need download the following images and save into the same folder...
Question:
The factorial function (symbol: !) says to multiply all whole numbers from our chosen number down to 1.
Examples:
4! = 4 × 3 × 2 × 1 = 24
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040
1! = 1
Factorial is not defined for...
Posted at 12:16h
in
Uncategorized
by admin
Question:
Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mobile is usually found hanging over cradles of small babies.
The figure illustrates a simple mobile. It is just a wire, suspended by...
Question 1:
Make a class definition for a BankAccount. It should have attributes for :
– its name (a string),
– account number (a string or integer),
– and balance (a float).
It should have methods to:
– make deposits with displaying the balance,
– and make withdrawals with displaying the balance.
Hint:
Question 2:
Create...