Answer:
Hi there Tonyhh! Please find the implementation below.
Explanation:
You can save the below code in a file called "price_discount.py". The code is implemented in python 2.0+. To make it work in Python 3.0+, simply update the code to use "input" rather than "raw_input".
price_discount.py
def calculate_discount(price, quantity):
total = 0.95 * price * quantity;
return total;
price = raw_input("Enter a price: ");
try:
price = int(price);
while price <= 0:
print("Input a valid number: ")
price = raw_input("Enter a price: ");
quantity = raw_input("Enter a quantity: ");
try:
quantity = int(quantity);
if quantity >= 10:
print(calculate_discount(price, quantity));
except ValueError:
print("Invalid quantity!")
except ValueError:
print("Invalid input!");
price = -1;
Answer:
The required cash used to retire a debt can be computed as follows:
Cash used to retire debt = cash available to retire a debt, if the cash available to retire debt is less than the loan balance from previous month. Otherwise, cash used to retire debt is equal to the loan balance from previous month.
The excel formula to perform this task is provided as follows:
D33 = IF(D32<C34,D32,C34)
The same formula is used to get the values for E33 to I33.
Explanation:
See the attached picture for table.
It will take 8 times more time to sort a 40-element list compared to the time spent on a 5-element list.
We can arrive at this answer as follows:
- We can see that if we divide a group of 40 elements into groups containing 5 elements, we will have 8 groups.
- In this case, the time it would take to sort the list of one group of 5 elements would be repeated 8 times so that we could sort all the groups and their elements.
Another way to do this is to divide the number 40 by 5. We would have the number 8 as a result, which indicates that we would need 8 times more time to sort a list of 40 elements, compared to a list of 5 elements.
You can get more information about lists at this link:
brainly.com/question/4757050
Answer:
Explanation:
Content Knowledge—You will determine the importance of computer skills, organizational structures, labor laws, community programs and managerial qualities in an industry of your choice. Inquiry—You will conduct online research in which you will collect information, make observations, and communicate your results in written form. 21st Century Skills—You will use critical thinking and problem solving skills, and communicate effectively
Answer:
In weighted codes, each digit is a assigned a specific weight according to its position. NON- WEIGHTED CODE - The Non - Weighted Code are not positionally weighted. In other words, codes that are not assigned with any weight to each digit position. Hope it helpful U.