What is the term for copying a repository from GitHub to your local machine?
git clone
Why do we use Git for game development?
To track changes in code and collaborate with others.
Console.WriteLine("Hello World")
What is Missing?
A semicolon (;) at the end.
What operator is used for addition?
+
How do you declare a string variable in C#?
string variableName;
What is the term for saving changes to your local repository?
git commit
What is the main benefit of using Git to manage game projects?
Version control allows us to revert to earlier versions if something breaks.
int FunnyVariableName = true;
What's Wrong Here?
Variable Initalized incorrectly, should be Boolean
bool FunnyVariableName = true;
What operator is used to check for equality between two values?
==
How can you increase an integer variable by 5?
variable += 5;
What is the term for sending your committed changes to a remote repository?
git push
How does Git help with team collaboration?
Multiple team members can work on the same project without overwriting each other’s changes.
if (x == 5)
Console.WriteLine("X is five");
What is Missing?
Braces { } around the Console.WriteLine statement.
What operator is used to subtract one value from another?
-
How do you convert a string to an integer in C#?
int.Parse(stringVariable);
What is the term for updating your local repository with the latest changes from the remote?
git pull
What is the benefit of branching in Git?
It allows developers to work on features or bug fixes independently of the main codebase.
Console.WriteLine("Enter your age: ");
age = int.Parse(Console.ReadLine());
What is Missing?
A declaration for the age variable (e.g., int age;).
What operator is used to combine two conditions in an if statement, both of which must be true?
&&
How can you add two different strings variables in C#?
Use the + operator (e.g., string1 + string2).
What file is used to specify files you want Git to ignore?
.gitignore
How does Git help prevent data loss?
Changes are saved incrementally, and you can restore previous versions of files or commits.
if (Howdy == true)
{
Console.WriteLine("Howdy!")
}
else if
{
Console.WriteLine("Sad-howdy")
}
What's Wrong Here?
No else if condition / should be else
What operator is used to increment a variable by 1?
++
What is the difference between = and == in C#?
= is the assignment operator, while == is the equality comparison operator.