Wek 4 Flashcards
What is a constant?
Fixed values such as number, letters are called constants because these numbers do not change
What do string constant use?
quotes (‘) or double quotes (“)
What is a variable?
is a named place in the memory where a programmer can store data and later receive the data suing the variable “name”
Do programmers get to use choose the names of variables?
Yes, they do.
What are good names for variables?
spam, eggs, spam23, _speed
What are bad names for variables?
23spam, #sign, var.12
Are these distinct variables: spam, Spam, SPAM ?
Yes.
Can you use reserved words as valuables?
No, you cannot.
What is this: x = 2
An assignment statement
How do you call this:
x = x + 2 (Assignment with expression)
Of what does an assignment statement consist?
Can x change its value?
Yes, absolutely
What is the operator for addition?
x
What is the Oprator for subtraction?
-
What is the Operator for multiplication ?
*