Answer:
See Explanation
Explanation:
<em>See attachment for complete question</em>
The programming language is not stated; I'll answer using Python and Java
Python:
low = 56
high = 70
for i in range(low,high+1):
print(i)
Java:
public class PrintOut{
public static void main(String [] args)
{
int low = 56; int high = 70;
for(int i = low; i<=high;i++)
System.out.print(i+" ");
}
}
For both codes, the explanation is:
The code starts by initializing the range of the print out to 56 and 70
Next, the code segment used an iteration that loops through 56 and 70 and print each digit in this range (both numbers, inclusive).
Answer:
The function code and the formula for the above question is listed below:
Explanation:
Function:
float typing_speed(int Number_of_words, int Time_in_seconds)
{
float time= Time_in_seconds/60;
float speed= Number_of_words/time;
return speed;
}
Formula for this algorithm or program:
Number of words per minute= number of words/ Time(in minutes).
Function Explanation
- The above function defined in the c-language code, which is used to return the typing speed for any user when he enters the number of words and the time in seconds.
- The speed is calculated with the help of the above-defined formula.
- The first statement of the code is used to change the time in a minute.
- The second statement of the code is used to calculate the speed by the help of speed formula.
- Then the third statement returns the value of the speed variable.