You are on page 1of 2

Alternate Unit 2 Portfolio

Use the information that you learned from the Read and Respond in Unit 1 lesson 1 to
complete the following questions. You may submit this in place of the Unit 2 Portfolio.

Please complete the following questions. It is important that you use full sentences and
present the questions and answers when you submit your work.

Submit the work as a file attachment. This means you complete all work in a word
processing document (e.g., Microsoft Word) and attach the file using the dropbox tool.

The answers to the Review & Critical Thinking questions are worth 15 points.

Review Questions
1. What do we mean when we say a programming language is “higher-level?” Why
would a developer use a higher-level language?
2. What does a compiler do, and why is it necessary when using higher-level
languages?
3. Name and define (or list the set that defines) three of the four common data
types in programming.

Critical Thinking Questions


1. Why is it useful to understand coding fundamentals even if you work in a game
design role that doesn’t traditionally write code?
2. Imagine you need to create a series of “bounce pads” for a platform game—a set
of platforms that propel the character high into the air, with a challenge of having
the player move from pad to pad before landing on a normal platform. Describe
an efficient way to set up that scenario, using things like conditional logic,
queries, pre-fabs, etc. (you don’t need to include the specific code for the
“bounce” effect!).
3. Why would a programmer use a “public” variable for something like speed?
Provide at least two other examples of variables a developer would likely make
“public.”
4. Review the following code for different random number generators:
Random rnd = new Random();
int month = rnd.Next(1, 13); // 1 <= month < 13
int dice = rnd.Next(1, 7); // 1 <= dice< 7
int card = rnd.Next(53); // 0 <= card< 53
Using what you know of programming, what do each of the three options indicate
they are doing? When might you want a random number generator in a game?
5. The unit discusses the weaknesses of copy-and-pasting code: it leads to errors
when you forget to change a value or miss part of the section you meant to copy.
Can you think of any other risks to “Copy Pasta?” Do you agree with the unit’s
argument? Why or why not?

You might also like