Quiz 4

Quiz

Beginner

+60 XP

15m

Unity Technologies

Quiz 4 thumbnail

This quiz will assess your knowledge of the skills and concepts learned in Unit 4.

Languages available:

Question 1

You’re trying to write some code that creates a random age between 1 and 100 and prints that age, but there is an error. What would fix the error?

Select only one

Question 2

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

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

Select only one

Question 3

The code below produces “error CS0029: Cannot implicitly convert type 'float' to 'UnityEngine.Vector3'”. Which of the following would remove the error?

Select only one

Question 4

Which of the following follows Unity’s naming conventions (especially as it relates to capitalization)?

Select only one

Question 5

You are trying to assign the powerup variable in the inspector, but it is not showing up in the Player Controller component. What is the problem?

Select only one

Question 6

Your game has just started and you see the error, “UnassignedReferenceException: The variable playerIndicator of PlayerController has not been assigned.” What is likely the solution to the problem?

Select only one

Question 7

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

Select only one

Question 8

Which comment best describes the code below?

Select only one

Question 9

The code below produces the error, “error CS0029: Cannot implicitly convert type 'UnityEngine.GameObject' to 'UnityEngine.Rigidbody'”. What could be done to fix this issue?

Select only one

Question 10

Which of the following statements about functions/methods are correct:

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

1/10

Retake allowed after

0 Mins