Answer: one field copy gets generated in memory
Explanation:
When a field is declared static,it will become common for entire class instances. Single copy of field that gets created for the particular class where numerous instances present in that class can use it by sharing .
- Other options are incorrect because two copy of reference does not gets created as it only supports single copy.
- Copy of the field for every class is not generated by static field.All method and instances use only one field copy for the whole class.
- Thus the correct answer is creation of only one field copy in memory for static field.
i think its D but i am not exactly sure
Answer:
Single-evidence form
Explanation:
Single-evidence form dedicates a page for each item retrieved for a case; it allows investigators to add more detail about exactly what was done to the evidence each time it was taken from the storage locker.
Your issue is on line 19 in your if statement. In python, if you have more than one condition in an if statement, you have to explicitly mention it after the or.
Your if statement is
if again == "Y" or "y":
However, this will always return true because the second statement simply asks "y".
To correct this, simply change the if statement to:
if again == "Y" or again == "y":
This will correct your code.
Another thing to consider is to always convert a userinput (whenever possible) to one version, this can be accomplished in your code by converting "again" into one version by using the .lower function.
again = input("Would you like to draw a 3rd card? Y or N? ")
again = again.lower()
Hope this helps!
Answer:
Class SavingsAccount( ):
annual_interest_rate
def.__init__(self, savings_balance):
self.savingsBalance = savings_balance
def calculatMonthlyInterest( ):
self.savingsBalance += (self.savingsBalance * annual_interest_rate) /12
return self.savingsBalance
def setInterestRate_(self, value):
self.annual_interest_rate = value
Explanation:
The python class above is used to create a savings account data for a customer, with methods to change the static interest rate and to calculate the monthly interest rate.