Khan.randRange(0, 31) Quiz3.Q1setRight(Q1xValue) Quiz3.Q1option[0] Quiz3.Q1option[1] Khan.randRange(0, 101) Quiz3.Q2setRight(Q2xValue) Quiz3.Q2option[0] Quiz3.Q2option[1] Quiz3.Q2option[2] Khan.randRange(0, 2) Quiz3.Q3intToBool(Q3xInt) Quiz3.Q3setRight(Q3xValue) Quiz3.Q3option[0]

If this code runs, what will be printed out? You can assume the variable x equals Q1xValue The correct answer is Q1Solution

          			if (x<20){
          				System.out.println("STATEMENT 1");
          			else if(x <25){
          				System.out.println("STATEMENT 2");
          			}else{
          				System.out.println("STATEMENT 3");
          			}
            

Q1Solution
  • Q1wrong1
  • Q1wrong2

There are no hints for this question

If this code runs, what will be printed out? You can assume the variable x equals Q2Solution

              if (x<20){
                System.out.println("STATEMENT 1");
              }

              if (x>50){
                System.out.println ("STATEMENT 2");
              }else{
                System.out.println("STATEMENT 3");
              }

              if(x>90){
                System.out.println("STATEMENT 4");
              }
            

Q2Solution
  • Q2wrong1
  • Q2wrong2
  • Q2wrong3

There are no hints for this question

If this code runs, what will be printed out? You can assume the variable x equals Q3xValue

              if (!x){
          			print("STATEMENT 1");
          		else{
          			print("STATEMENT 2");
          		}
            

Q3Solution
  • Q3wrong1

There are no hints for this question