1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
castortr0y [4]
3 years ago
13

Write a function digits() that accepts a non-negative integer argument n and returns the number of digits in it’s decimal repres

entation. For credit, you should implement this using a loop and repeated integer division; you should not use math.log(), math.log10(), or conversion to string
Engineering
1 answer:
Katyanochek1 [597]3 years ago
3 0

Answer:

Explanation:

Let do this in python. We will utilize the while loop and keep on dividing by 10 until that number is less than 10. Along the loop we will count the number of looping process. Once the loop ends, we can output that as answer.

def digits(n):

    n_digit = 1

    while n >= 10:

         n_digit += 1

         n /= 10

    return n_digit

You might be interested in
Metal wireways are sheet metal troughs with _____________ for housing and protecting electrical conductors and cable.
levacccp [35]

Answer:

Metal wireways are sheet metal "U"s with removable housing for protecting electrical equipment, wires, and cables.

Explanation:

These are especially used to run wire in manufacturing environments.

5 0
2 years ago
What is an example of a product made of textile?
Otrada [13]

beach \: towel \\  \\ hope \: it \: helps

4 0
2 years ago
Outline the structure of an input-output model (including assumptions about supply and demand). What is an inverse matrix? Why i
pishuonlain [190]

Answer:

Explanation:

C.1 Input-Output Model

It is a formal model that divides the economy into 2 sectors and traces the flow of inter-industry purchases and sales. This model was developed by Wassily Leontief in 1951. In simpler terms, the inter-industry model is a quantitative economic model that defines how the output of one industry becomes the input of another industrial sector. It is an interdependent economic model where the output of one becomes the input of another. For Eg: The Agriculture sector produces output using the inputs from the manufacturing sector.

The 3 main elements are:

Concentrates on an economy which is in equilibrium

Deals with technical aspects of production

Based on empirical investigations and assumptions

Assumptions

2 sectors - " Inter industry sector" and "final sector"

Output of one industry is the input for another

No 2 goods are produced jointly. i.e each industry produces homogenous goods

Prices, factor suppliers and consumer demands are given

No external economies or diseconomies of production

Constant returns to scale

The combinations of inputs are employed in rigidly fixed proportions.

Structure of IO model

See image 1

Quadrant 1: Flow of products which are both produced and consumed in the process of production

Quadrant 2: Final demand for products of each producing industry.

Quadrant 3: Primary inputs to industries (raw materials)

Quadrant 4: Primary inputs to direct consumption (Eg: electricity)

The model can be used in the analysis of the labor market, forecast economic development of a nation and analyze economic developments of various regions.

Leontief inverse matrix shows the output rises in each sector due to a unit increase in final demand. Inverting the matrix is significant since it is a linear system of equations with unique solutions. Thus, the final demand vector for the required output can be found.

C.2 Linear programming problems

Linear programming problems are optimization problems in which objective function and the constraints are all linear. It is most useful in making the best use of scarce resources during complex decision makings.

Primal LP, Dual LP, and Interpretations

Primal linear programming: They can be viewed as a resource allocation model that seeks to maximize revenue under limited resources. Every linear program has associated with it a related linear program called dual program. The original problem in relation to its dual is termed as a primal problem. The objective function is a linear combination of n variables. There are m constraints that place an upper bound on a linear combination of the n variables The goal is to maximize the value of objective functions that are subject to the constraints. If the primal linear programming has finite optimal value, then the dual has finite optimal value, and the primal and dual have the same optimal value. If the optimal solution to the primal problem makes a constraint into a strict inequality, it implies that the corresponding dual variable must be 0. The revenue-maximizing problem is an example of a primal problem.

Dual Linear Programming: They represent the worth per unit of resource. The objective function is a linear combination of m values that are the limits in the m constraints from the primal problem. There are n dual constraints that place a lower bound on a linear combination of m dual variables. The optimal dual solution implies fair prices for associated resources. Stri=ong duality implies the Company’s maximum revenue from selling furniture = Entrepreneur’s minimum cost of purchasing resources, i.e company makes no profit. Cost minimizing problem is an example of dual problems

See image 2

n - economic activities

m - resources

cj - revenue per unit of activity j

4 0
3 years ago
Read 2 more answers
A program is seeded with 30 faults. During testing, 21 faults are detected, 15 of which are seeded faults and 6 of which are ind
Vesna [10]

Answer:

Estimated number of indigenous faults remaining undetected is 6

Explanation:

The maximum likelihood estimate of indigenous faults is given by,

N_F=n_F\times \frac{N_S}{n_S} here,

n_F = the number of unseeded faults = 6

N_S = number of seeded faults = 30

n_s = number of seeded faults found = 15

So NF will be calculated as,

N_F=6\times \frac{30}{15}=12

And the estimate of faults remaining is  N_F-n_F = 12 - 6 = 6

8 0
3 years ago
Removing Shingles from a roof is called a
torisob [31]
D remodeling roofing
7 0
3 years ago
Other questions:
  • Steam undergoes an isentropic compression in an insulated piston–cylinder assembly from an initial state where T1 5 1208C, p1 5
    15·1 answer
  • Suppose you are implementing a relational employee database, where the database is a list of tuples formed by the names, the pho
    14·1 answer
  • Answer the following questions, and very briefly explain your answer:
    5·1 answer
  • Answer the following questions about your own experience in the labor force.
    15·1 answer
  • Technician A says that to depressurize high-pressure components of the electronic brake control (EBC) system, research the proce
    13·1 answer
  • The velocity components expressed in m/s<br>​
    6·1 answer
  • What classes do you have to take in college for be a system software engineer
    14·1 answer
  • Which band has an average of $3.58 per hour of parking?
    11·1 answer
  • An unknown relative passes away and bequeaths upon you a small tract of land in Amherst. You decide to build a two-story storage
    14·1 answer
  • A composite plane wall consists of a 5-in.-thick layer of insulation (ks = 0.029 Btu/h*ft*°R) and a 0.75-in.-thick layer of sidi
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!