Answer:
Following are code of factorial in python language
def factorial(n): # function
result=1 #variable
for x in range(2,n+1): #iterating the loop
result=result*x #storing result
return result #return result
for n in range(10): #iterating loop
print(n,factorial(n)) #print factorial
Output:
Following are the attachment of output
Explanation:
Missing information :
In the question the information is missing the code is missing which we have to correct it following are the code that are mention below.
def factorial(n): # function
result=1 #variable
for x in range( ): #iterating the loop
result= #storing result
return #return result
for n in range( ): #iterating loop
print(n,factorial(n)) #print factorial
Following are the description of code
- We have create a function factorial in this we have pass the one parameter i.e "n".
- In the for loop we have pass 2,n+1 which has been used to iterating the loop calculating factorial and string the result in the result variable
- In the main function we have pass the range on which we have to calculated the factorial
- Finally the print function will print the factorial .
Following are the attachment snip of code in the python language
Baseline data is a record of all the system performance specifications when the system is operating as designed. A technician should record a system's baseline data On a new system after it is installed.
This is an incomplete question. The complete question is given below:
Mike has never used slide presentation software before but he needs to create a presentation by the end of the week what resource would be most helpful to mike
a. The 350-page printed manual from the slide presentation software publisher
b. A free tutorial the slide presentation software publisher has posted on the company website
c. A trouble-shooting website created by a third party
d. The 350-page online manual from the slide presentation software publisher
Answer:
b - A free tutorial the slide presentation software publisher has posted on the company website
Explanation:
As Mike has a short time and no prior experience with a slide software, then in this scenario, the best, simplest and fastest way to learn and create a presentation a free tutorial which the slide presentation software publisher has posted on the company website as this is the same company that has created this particular software so he can be rest-assured that the resource he is relying on is authentic and up-to-date with information on latest features.
Moreover, it's efficient and quick way to learn from a free tutorial rather than from 350-page printed or online manual especially for a beginner.
Besides, his purpose is to create the presentation using the software and not trouble-shooting so trouble-shooting website created by a third party is not useful for him and it also might not be authentic or updated as well.
Answer:
High availability
Explanation:
RAID-5 array is defined as a redundant array for independent disk configuration which makes use of the disk striping with the parity. It consists of a minimum three disk drives and it uses the data striping and the parity data to provide the redundancy.
RAID 5 is a powerful tool to ensure integrity of the data. It provides both performance as well as security to the data.
In the context, "high availability" is the feature that is provided by the deployment of RAID 5 array on the several file services.
Answer:
e) Code segment II produces correct output for all values of str, but code segment I produces correct output only for values of str that contain "pea" but not "pear".
Explanation:
<em>if - elseif - else statements work in sequence in which they are written. </em>
- <em> </em>In case <em>if() statement is true, </em>else if() and else statements will not get executed.
- In case <em>else if() statement is true</em>, conditions in if() and else if() will be checked and else statement will not be executed.
- In case <em>if() and else if() both are false</em>, else statement will be executed<em>.</em>
First, let us consider code segment I.
In this, first of all "pea" is checked in if() statement which will look for "pea" only in the String str. So, even if "pearl" or "pear" or "pea" is present in 'str' the result will be true and "pea" will get printed always.
After that there are else if() and else statements which will not get executed because if() statement was already true. As a result else if() and else statements will be skipped.
Now, let us consider code segment II.
In this, "pearl" is checked in if() condition, so it will result in desired output.
Executable code is attached hereby.
Correct option is (e).
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
java
</span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark">
java
</span>