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:
...
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...
Question:
Kenny wants to go trick-or-treating too! But the street has many spooky decorations put up on it. Kenny doesn’t like to be scared, so he avoids spooky areas.
There are L houses arranged in a line on the street, numbered from 1 to L. Each house...
Question 1:
Create a Student class and make the following methods to :
__init__() – Initialize it with name and roll number.
__str__() – Display all information of the student.
setAge() – It should assign age to student.
setMarks() – It should assign marks to the...
Question:
Every girl likes shopping, so does Jessica. Now she finds the shop is increasing the price every day because the Spring Festival is coming. Her favorite shop named “memory”. Now she wants to know the rank of this shop’s price after the change of everyday.
Input...
Posted at 15:36h
in
Uncategorized
by admin
Question:
Modify the program we made in the class. Create a Boss Class
the __init__() method will take three parameters (imgFile, location and speed)
the update() method will move the object, if the top of the object reaches the bottom of the screen, it will disappear...