Write a function called random_marks. random_marks should #take three parameters, all integers. It should return a #string. # #The first parameter represents how many apostrophes should #be in the string. The second parameter represents how many #quotation marks should be in the string. The third #parameter represen

Respuesta :

Answer:

Explanation:

The following code is written in Java. It creates the function random_marks as requested. It uses three for loops to go concatenating the correct number of apostrophes, quotes, and pairs to the output string before returning it to the user. A test case was added in main and the output can be seen in the attached picture below.

class Brainly {

   public static void main(String[] args) {

       String output = random_marks(3,2,3);

       System.out.println(output);

   }

   public static String random_marks(int apostrophe, int quotes, int pairs) {

       String output = "";

       for (int x = 0; x < apostrophe; x++) {

           output += '\'';

       }

       for (int x = 0; x < quotes; x++) {

           output += '\"';

       }

       for (int x = 0; x < pairs; x++) {

           output += "\'\"";

       }

       return output;

   }

}

Ver imagen sandlee09