In the context of gradient descent, what is the purpose of t…

In the context of gradient descent, what is the purpose of the “learning rate”? _______________     A) To determine the direction of the gradient    B) To increase the speed of convergence by amplifying the gradient    C) To scale the gradient and control the step size    D) To find the local minimum of a non-differentiable function

Write a method countConsonants() which counts the number of…

Write a method countConsonants() which counts the number of consonants in a string. As a reminder, consonants are letters other than the vowels a, e, i, o, and u. Your method should take one parameter, a string, and return an integer. For purposes of this question, assume that the entire string is lowercase. Hint: remember that you can use the .charAt() method to return the character at the specified index of the string. Copy and paste the code below into IntelliJ, and write your code in place of the “/* Your solution goes here  */” block. But make sure to paste all of the code back here when you are done. import java.util.Scanner;public class Main { /* Your solution goes here */ public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print(“Enter a word: “); String s = in.next(); System.out.println(s + ” has ” + countConsonants(s) + ” consonants.”); } } Rubric: Program compiles and runs without throwing exceptions or entering an infinite loop (5pt) Declare method countConsonants() with correct type of return value (5pt) Declare method countConsonants() with correct number and type(s) of parameter variables (5pt) Correctly count number of consonants in the string (10pts)