Question 1:
Modify the program we made in the class. Make sure you can close window when the game over window shows. You can find code from following link:
Friday shooting Game2
If you do not have the sound file, please download the following sound for this game:
shoot.wav
explosion.wav
bluespace.mp3
Question...
Posted at 00:49h
in
Uncategorized
by admin
Question 1:
Create a Tank object which have the attributes of:
name
direction(up/down/left/right)
x position and
y position
The object also have a method:
move (direction, steps)
Using __init__ to Initial the tank to make sure it start from x position of 0 and y position of 0
Use print(tank...
Posted at 22:48h
in
Uncategorized
by admin
Question 1:
Using function or object method to write a program to return the number of times that the string
"code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
For example:
'aaacodebbb' will have 1 "code"
'codexxcode' will have 2...
Posted at 01:59h
in
Uncategorized
by admin
Question:
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:
Modify the program we made in the class. Add starting screen as below, the real game will start when play click the mouse in the range of the "PLAY" button. (Scroll down for more hint)
You can also download the code from the following link:
Friday shooting...
Posted at 22:23h
in
Uncategorized
by admin
Question:
Write a Python program (either use function or object method) to check the validity of password input by users.
Validation :
At least 1 letter between [a-z] and 1 letter between[A-Z].
At least 1 number between [0-9].
At least 1 character from [$#@].
Minimum length 6...