unit 3 practice question set 8

unit 3 practice question set 8

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Test on Python Function

Test on Python Function

11th - 12th Grade

12 Qs

Types of Mass Media

Types of Mass Media

10th Grade - Professional Development

11 Qs

LENGUAJE C

LENGUAJE C

11th Grade

13 Qs

Cuestionario Steve Jobs

Cuestionario Steve Jobs

12th Grade - University

10 Qs

Sistema Operativo Android

Sistema Operativo Android

9th - 12th Grade

10 Qs

Excel

Excel

1st - 12th Grade

8 Qs

Clase de Computación: Excel

Clase de Computación: Excel

11th Grade

12 Qs

Pengenalan Aplikasi Blender

Pengenalan Aplikasi Blender

11th Grade

13 Qs

unit 3 practice question set 8

unit 3 practice question set 8

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Easy

Created by

Caleb Kim

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    int x =2;
    int y =3;

    System.out.println(x + " + "+ y + " = " +adder(y,x));
   }

 public static int adder(int x, int y)
 {
    return x+y;
 }
}

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    int x =2;
    int y =3;
    int answer = subtracter(x,y);

    System.out.println(x + " - "+ y + " = " +answer);
   }

 public static int subtracter(int x, int y)
 {
    return x-y;
 }
}

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    int x =2;
    int y =3;
    int answer = subtracter(y,x);

    System.out.println(x + " - "+ y + " = " +answer);
   }

 public static int subtracter(int x, int y)
 {
    return x-y;
 }
}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    int x = 5;
int y = 2;

System.out.println(mystery(x,y));
   }

 public static int mystery(int x, int y)
 {
    return x+y;
 }

public static double mystery(double x, double y)
{
  return x-y;
}

public static double mystery(double x, int y)
{
  return x/y;
}

public static int mystery(int a)
{
  return (int)(Math.pow(a,2));
}
}

3.5

2.5

7

error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    int x = 5;
int y = 2;

System.out.println(mystery(x));
   }

 public static int mystery(int x, int y)
 {
    return x+y;
 }

public static double mystery(double x, double y)
{
  return x-y;
}

public static double mystery(double x, int y)
{
  return x/y;
}

public static int mystery(int a)
{
  return (int)(Math.pow(a,2));
}
}

error

25

3.5

7

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    double x = 5;
double y = 2;

System.out.println(mystery(x, y));
   }

 public static int mystery(int x, int y)
 {
    return x+y;
 }

public static double mystery(double x, double y)
{
  return x-y;
}

public static double mystery(double x, int y)
{
  return x/y;
}

public static int mystery(int a)
{
  return (int)(Math.pow(a,2));
}
}

error

7

2.5

3.0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the below code?

public class TestClass
{
 public static void main(String[] args)
 {
    double x = 5;
int y = 2;

System.out.println(mystery(x,y));
   }

 public static int mystery(int x, int y)
 {
    return x+y;
 }

public static double mystery(double x, double y)
{
  return x-y;
}

public static double mystery(double x, int y)
{
  return x/y;
}

public static int mystery(int a)
{
  return (int)(Math.pow(a,2));
}
}

error

2.5

3.0

25

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?