Getting a Hang of Variables
Create a script and for each of the statements, do the following:
Declare the Variable within a scope
Use the correct case for the name
Make sure that each has a default value
Set the variable to a different value in Start()
Print the value using Debug.Log
An account name which will need to be displayed
A password we want to keep hidden
A score to display in UI
A timer (which counts in minutes and seconds)
A location in the scene to spawn enemies (that we can edit in editor)
Getting a Hang of Operators & Flow
Create a script and for each of the statements, do the following:
Declare any Variables required (publicly)
Write the code in Update ()
Print (Debug.Log) the value
Run the code and get each option to display in the console
If the timer is greater than 1.5 seconds print the word "Tick" and set timer to zero
If the door is both Unlocked and Closed, set the door open, else if the door is Unlocked and Opened, close it
In a bolwing game if this the first shot and the number of pins is zero, print "Strike!", else if it is the second shot and the pins equals zero, print "Spare"
Let’s Do Some Basic Interactivity
When I push the spacebar
Pick a random number (“Roll a dice”)
Keep track of how many times I’ve rolled
Track the total value of all the rolls
Get average of my rolls so far
Print the values