Pre-assessment for VR Development

Quiz

Intermediate

+60 XP

15m

Unity Technologies

Pre-assessment for VR Development thumbnail

The purpose of this pre-assessment is to make sure that you don’t have any knowledge gaps before moving on with the Custom VR Development mission.

If you pass the pre-assessment, you should have no problem completing the rest of this pathway.

If you don’t pass the pre-assessment, we’ll provide some resources in the question feedback for each specific knowledge area. Try to spend a good amount of time improving your skills in these areas, then return here and try again!

Languages available:

Question 1

Which of the following statements are true about virtual methods?

Select all correct answers.

Select all correct answers

Question 2

Read the documentation from the Unity Scripting API about Random.Range and then read the code below.

float randomFloat = Random.Range(0f, 100f);
int randomInt = Random.Range(0, 100);

Which of the following are possible values for the randomFloat and randomInt variables?

Select only one

Question 3

Which of the following statements are true about parent (base) and child (derived) classes?

Select all correct answers.

Select all correct answers

Question 4

The code below uses the static modifier:

public class Enemy : MonoBehaviour {
   public static int EnemyHealth = 100;
}

What is the effect of using the static modifier here?

Select all correct answers.

Select all correct answers

Question 5

You are trying to create a new method that takes a number and multiplies it by two. Which method would do that?

Method 1

private float DoubleNumber() { 
  return number *= 2;
}

Method 2

private float DoubleNumber(float number) { 
  return number *= 2;
}

Method 3

private void DoubleNumber(float number) {
  return number *= 2;
}

Method 4

private void DoubleNumber() {
  return number *= 2;
}

Select only one

Question 6

The following message was displayed in the console: “Monica has 20 dollars”.

string[] names = new string[] { "Steve", "Monica", "Eric" };
int money = 5;

void Start() {
  money *= 2;
  PrintNames();
}

void PrintNames () {
  Debug.Log("Monica has " + money/2 + " dollars"); // Line 1
  Debug.Log(names[1] + " has " + money*2 + " dollars"); // Line 2
  Debug.Log(names[2] + " has " + money*2 + " dollars"); // Line 3
  Debug.Log(names[Monica] + " has " + money/2 + " dollars"); // Line 4
}

Which of the line options in the PrintNames function produced it?

Select only one

Question 7

Which of the following statements about methods are correct?

Select all correct answers.

Select only one

Question 8

The code below shows the manual implementation of a property in C#.

private string _playerName;
public string PlayerName
{
   get { return _playerName; }
   set { _playerName = value; }
}

There is a more concise “auto-implemented” version of this code that accomplishes the same thing. What is it?

Select only one

Submit answers

To calculate your score, submit your answers to the quiz. A passing score will mark this quiz complete.

Correct answers needed to pass

6/8

Retake allowed after

24 Hours 0 Mins