Solutions
A program consists of Correct Answer - instructions (aka
statements) that execute one at a time, to get input, process data,
and put output.
A program uses variables to hold Correct Answer - data, which
may change ("vary").
A flowchart depicts a program Correct Answer - graphically,
with a node for each statement.
Literal Correct Answer - Exactly true
specific value in code
A program can output a variable's Correct Answer - value, or a
string literal consisting of characters (including a newline
character).
A program can contain Correct Answer - comments, which are
for humans only and ignored when the program runs.
Most whitespace (regular spaces or newlines) is Correct Answer -
ignored by a program, but good practice uses whitespace in a
consistent way.
The information age is quite Correct Answer - new in human
history. Changes are rapid.
Computers surround us and computer numbers and usage continue
to Correct Answer - grow.
,Inside a computer, all data (characters, numbers, and more) is
represented as Correct Answer - bits: 0's and 1's.
Programming is largely about Correct Answer - problem
solving, namely creating a methodical solution to a given task.
Careers in computing are Correct Answer - numerous, highly-
rated, and growing. Non-computing jobs may benefit from
programming.
Pseudocode is an Correct Answer - informal textual
representation of a program intended for easy human
understanding.
How do you save a value to a variable? Correct Answer -
variable assignment or constant variable
A variable declaration declares a Correct Answer - new
variable, specifying the variable's name and type.
An assignment statement Correct Answer - assigns the
variable on the left-side of the = with the current value of the right-
side expression.
An expression is a combination of Correct Answer - items, like
variables, literals, operators, and parentheses, that evaluates to a
value.
identifier Correct Answer - A name created by a programmer
for an item like a variable or function is called an identifier, which
must follow certain rules to be valid.
What constitutes a valid identifier? Correct Answer - -be a
sequence of letters (a-z, A-Z), underscores (_), and digits (0-9)
, -start with a letter or underscore
-case sensitive (numCats and NumCats two different things)
Programmers typically follow identifier naming conventions that
are defined by their Correct Answer - company, team, teacher,
etc.
An expression is evaluated using Correct Answer - precedence
rules that follow the evaluation order of standard mathematics.
Incremental development is the process of writing and and testing
Correct Answer - a small amount of code, then writing and
testing a small amount more (an incremental amount), and so on.
A variable declared as type float stores a Correct Answer -
floating-point number, which is a real number, like 98.6, 0.0001, or -
666.667.
A programmer should choose a variable's type based on the type of
Correct Answer - value held.
Integer variables are typically used for values that are Correct
Answer - counted.
Floating-point variables are typically used for values that are
measured or when dealing with Correct Answer - fractions of
countable items, such as the average number of cars per household.
Programming languages typically have Correct Answer - built-
in functions to perform common operations needed by
programmers, such as performing mathematical operations like
square root or raising a number to a power.