Answer:
The answer to the given question is given bellow in the explanation section:
Explanation:
<p>This is python code</p>
<p>In python when you enter input into the input function as given:</p>
<code> answer = input("How much does the sample weigh in grams? ") </code>
I will be taken as string.
So I have to convert this string to number format here the given data is float value i-e 3.5
so let convert it. using float function.
<code> answer = float (input("How much does the sample weigh in grams? ") ) </code>
Answer:
public static void PrintShampooInstructions(int numberOfCycles){
if (numberOfCycles<1){
System.out.println("Too Few");
}
else if(numberOfCycles>4){
System.out.println("Too many");
}
else
for(int i = 1; i<=numberOfCycles; i++){
System.out.println(i +": Lather and rinse");
}
System.out.println("Done");
}
Explanation:
I have used Java Programming language to solve this
Use if...elseif and else statement to determine and print "Too Few" or "Too Many".
If within range use a for loop to print the number of times
I think it’s cropping could be wrong though