Answer:
None of the mentioned options
Explanation:
- If we define a method in a derived class with same declaration type as that of base class then it is said to be overriding a function which behaves differently which will depend on the object which is calling the method.
- Option a,b and c are not any kind of methods we implement using coding.
- Option d is done when number or data types of parameters are different than the declaration of the base type.
Answer:
a=input("Amount in pennies")
b=int(a)
dollars=0
dimes= 0
quarters=0
nickels=0
pennies = 0
dollars = int(b/100)
b= b- dollars *100
quarters=int(b/25)
b=b-quarters*25
dimes = int(b/10)
b = b -dimes*10
nickels=int(b/5)
b=b - nickels * 5
pennies = b
print(dollars)
print(dimes)
print(nickels)
print(pennies)
Explanation:
The required program is in answer section. Note, the amount is entered in pennies.
sales = float(input("Enter monthly sales amount: $"))
commission = 0.05
if sales> 500000:
commission = 0.1
print("You earned: $"+str(sales*commission))
I wrote my code in python 3.8. I hope this helps.
Answer:
a. new, running, waiting, ready, and terminated.
Explanation:
The process in a computer system can have different states and these are:
-New: When the process is created.
-Ready: When the process is waiting to be executed.
-Running: When the process is chosen to be executed.
-Waiting: When the process is expecting for something to happen.
-Terminated: When the process is not running anymore.
According to this, the answer is that the possible states of a process are: new, running, waiting, ready, and terminated.
Answer:
Explanation:
Given
See attachment for rectangle
Required
Determine the area of the rectangle
Area is calculated as:
This gives:
<em>The area of Andrea's sketch is 6.25</em>