Answer:
def rec_dig_sum( num ):
num_list = [ digit for digit in str(num)]
total = 0
for x in num_list:
total += x
return total
def dict_of_rec_dig_sums(low, high):
mydict = dict()
for number in the range(low, high+1):
mydict[rec_dig_sum(number)] = number
return mydict
Explanation:
The python program defines two functions, "rec_dig_sum" and "dict_of_rec_dig_sums". The former accepts a number and returns the sum of the digits of the number while the latter accepts a low and high number range.
The program returns a dictionary with the recursive sum as the keys and the number count as the values.
Answer:
There are many factors that cause aggregate demand to shift from AD to AD1. The unemployment rate will fall and inflation will increase.
<u>Explanation:</u>
A Shift in aggregate demand from AD to AD1 means there has been a fall in demand. Various factors that cause demand to decrease are:
- Increase in price of a good itself
- Increase in the price of complimentary goods-This will lead to a fall in demand. Like ink and pen are complementary goods. if the Price of ink increases then demand for pen will decrease.
- A Decrease in the price of substitute goods-Like tea and coffee.
- Expectation regarding future fall in price
So due to the decrease in demand finally the unemployment will increase and with that, the inflation rate will increase making things dearer.
Answer:
I do not know that answer
Answer:
A and C are the only <u>legal</u> but unethical options
Answer:
The solution code is written in C++
- float cellPhone(int m, int tx){
- float COST_PER_MIN = 0.1;
- float COST_PER_MESSAGE = 0.2;
-
- float bill_amount = m * COST_PER_MIN + tx * COST_PER_MESSAGE;
-
- return bill_amount;
- }
Explanation:
Firstly, declare a function named cellPhone() that takes two input parameters, m and tx (Line 1).
Since the policy of the carrier company is not given in the question, I make a presumption that the cost per minutes is $0.10 and the cost per message is $0.20 (Line 2- 3).
Next, apply the formula m * COST_PER_MIN + tx * COST_PER_MESSAGE to calculate the total bill (Line 5) and return the bill_amount as function output (Line 7).