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?

Prototype 4

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Neil Boyle
Used 10+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Add a new line after line 8 that says “return age;”
On line 7, change the word “private” to “void”
Add the word “int” to line 8, so it says “int age = …”
Change line 1 to “private float age”
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The following message was displayed in the console: “Monica has 20 dollars”.
Which of the line options in the PrintNames function produced it?
Option A
Option B
Option c
Option D
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
he code below produces “error CS0029: Cannot implicitly convert type 'float' to 'UnityEngine.Vector3'”. Which of the following would remove the error?
On line 1, change “Vector3” to “float”
On line 3, change “=” to “+”
Either A or BNone of the above
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following follows Unity’s naming conventions (especially as it relates to capitalization)?
Line A
Line B
Line C
Line D
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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?
You cannot declare a powerup variable in the Player Controller Script
You cannot assign GameObject type variables in the inspector
The powerup variable should be public instead of private
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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?
PlayerController variable in the playerIndicator script needs to be declared
The playerIndicator variable needs to be made private
The PlayerController script must be assigned to the player object
An object needs to be dragged onto the playerIndicator variable in the inspector
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are trying to create a new method that takes a number and multiplies it by two. Which method would do that?
Method A
Method B
Method C
Method D
Create a free account and access millions of resources
Similar Resources on Quizizz
14 questions
GCSE Computing - Subprograms

Quiz
•
9th - 10th Grade
15 questions
Unity.Basics-2

Quiz
•
6th Grade - University
14 questions
Unit 5: Input in Java

Quiz
•
9th - 10th Grade
5 questions
BELL RINGER: Unity C# Review 1

Quiz
•
10th Grade
9 questions
Volleyball Quiz

Quiz
•
9th Grade
12 questions
Arrays Intro

Quiz
•
9th - 12th Grade
11 questions
J277 Programming - Data Types

Quiz
•
9th - 11th Grade
8 questions
2D Object and Physics Quiz

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University