Intro To Programming Flashcards
(38 cards)
What are the steps in the 5-Step Process?
Identify, Analyze, Develop, Implement, and Evaluate.
Before a code can run, it must be..? It is reduced to…?
Compiled.
0s and 1s.
The character variable is written as…? And how many characters can it hold? What kind of quotes are around it?
char.
Can only hold one character.
Single quotes.
String variables have what kind of quotes around it?
Double quotes.
What are escape characters?
They tell C# to treat the next character as part of the string.
What kinds of numeric data are there? How many places can it hold?
Int and float and double.
int - whole numbers.
float - 7 places.
double - 15 places.
What are variables?
They are the storage containers of the programming world.
What kind of notation is used with variables?
camelCase.
Which words cannot be used in a variable?
with, for, if or break.
as well as any numbers or special characters.
In string courseName = "ITP"; what kind of variable is this? what is the variable name? what is the assignment operator? the value...?
It is a string variable.
The variable name is courseName.
The “=” sign is the assignment operator.
“ITP” is the value.
What is an operator?
They are used to perform mathematical logical operations.
What is a modulo? What sign does it use?
It finds the remainder after the division of one # by another. It uses the % sign.
What does an increment look like? Decrement?
++ and –.
Do function and method mean the same thing?
Yes, but what we call them depends on the language and location. If it’s declared outside an object, it’s a method.
In
private static void Print (string value)
{
Console.WriteLine(value);
}
Where is the access modifier? Where is the "other" modifier? Where is the return type? Where is the Identifier? Where is the parameters?
The access modifier is private. The "other" modifier is static. The return type is void. The Identifier is Print. The parameters is (string value).
What is a method?
A block of statements under the signature.
What kind of values can the return value be?
It can be a literal, variable, constant, expression, or statement result.
What are some of the common errors in writing a code?
- declaring a method inside another’s body.
- mismatching/miscounting ( ) and { }.
- placing a semicolon at the end of the signature or body.
- mismatching/miscounting argument/parameter type/ order.
How do write a boolean variable and what is it?
bool.
and it holds a True or False value.
How do write equality and inequality?
== and !=
What is the difference between equality and assignment?
== means that it’s comparing two values.
= means that you are storing a value.
In an If statement, how does it run?
The contents of the parenthesis will be evaluated to a boolean value, either true or false.
If the condition is true, then the statement block runs, otherwise, it is ignored.
How do else statements run?
In a simple if, else conditional block, if the first condition is false, then the second block of code will be executed.
Can you use multiple else statements?
Yes, you can.