I think that this answer is amazing and nothing really needs to be added. Well Done!
the function and loop will be
def factorial(x):
total = 1
if x != 1 and x != 0:
for i in range(x,1,-1):
total *= i
return total
Answer:
The below mentioned portion is missing from the question
<em>A part of the sacrifice means the payment of more money in taxes. In my Budget Message I shall recommend that a greater portion of this great defense program be paid for from taxation than we are paying today. No person should try, or be allowed, to get rich out of this program; and the principle of tax payments in accordance with ability to pay should be constantly before our eyes to guide our legislation.
</em>
<em />
The passage provides the reason why extra taxes must be collected should America decide to join the war or it introduces the claim that patriotic Americans should be willing to sacrifice and pay extra taxes.
You are going to select 5 keyboards, from a set of 25 defective keyboards. When you select the first keyboard it may be have either electrical deffects or mechanical deffect, this is two possibilities. The same happens with the second, third, fourth and fifth selection. Then each selection has 2 different possibilities, and the number of possibilities are: 2*2*2*2*2 = 32.
But that is considering that the order matters. This is that it is different that the first has electrical deffects and the others have mechanical defects than the second has mechanical electrical deffects and the other has mechanical deffects.
If you the order is not relevant, then the only different outcomes are:
1) 5 with electrical deffects
2) 4 with electrical deffects and 1 with mechanical deffects
3) 3 with electrical deffects and 2 with mechanical deffects
4) 2 with electrical deffects and 3 with mechanical deffects
5) 1 with electrical deffects and 4 with mechanical deffects
5) 5 with mechanical deffects.
In this case the answer is 6 different ways.
Answer: 6