Posted at 20:25h
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:
...
Posted at 20:18h
in
archives
by admin
Question:
Modify the program we made in the class. if the boss is got shot by laser, use gotShot() function to make boss's HP decrease. If boss's hp is lower than 0 make the boss disappear from the screen ( you can use kill() method)...
Question:
Try to use the queue class to implement a general simulation of Hot Potato. Our program will input a list of names and a number, we call it “num,” to be used for counting. It will return the name of the last person remaining after...
Question:Many advanced calculators have a fraction feature that will simplify fractions for you. You are to write a program that will accept for input a non-negative integer as a numerator and a positive integer as a denominator, and output the fraction in simplest form. That...
Posted at 00:12h
in
Uncategorized
by admin
Question:
write a program to ask user about the date(year, month and day), then calculate the day of the year.
Sample input:
Year: 2016
Month: 6
Day: 23
Sample output:
Day of the year: 175
Hint:
You need consider leap years and non leap years, in order to do easier calculation, you may create...
Posted at 15:20h
in
Uncategorized
by admin
Question 1:(please use function that return a value)
Write a program to display information to a driver based on his/her speed according to the following table:
km/h over the limit
Fine
1 to 20
$100
21 to 30
$270
31 or above
$500
Sample Input 1:
Enter the speed limit: 40
Enter the recorded speed of the...