Save
Computer Science
Computational thinking, algorithms and programming
Programming fundamentals
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Reyaan Verma
Visit profile
Cards (93)
What is the term used to refer to data in programs?
Values
View source
What is a variable in programming?
A
variable
is a named
memory address
that holds a
value.
View source
How does the value of a variable behave during program execution?
The value held in a variable can
change as the program is running.
View source
What is the name given to a variable's name?
Identifier
View source
What is the process of identifying a variable before assigning a value to it called?
Declaring
a
variable
View source
What is the first rule for naming a variable?
A variable name must start with a
letter.
View source
What does the declaration "score as integer" signify?
It declares
a
variable called score that will hold integer values.
View source
What must a variable name contain at least one of?
It must contain at least one letter
at the
start
of the
name.
View source
What is the term for giving a variable a value?
Assignment
View source
Which characters are not allowed in a variable name?
Special characters
such as !@£$%&* or
punctuation characters.
View source
What are the three basic programming constructs?
Sequence
,
selection
, and
iteration
View source
If you want to assign the value 0 to the variable score, what would the code look like?
Score
=
0
View source
Can underscores be used in variable names?
Yes
, an underscore
can be used in variable names.
View source
What is the purpose of programming constructs in programs?
They form
the
basis
for
all programs
View source
What does sequence refer to in programming constructs?
The order in which instructions occur and are processed
View source
How does selection affect a program during execution?
It determines which path a program takes when it is running
View source
What is iteration in programming?
The
repeated execution
of a section of
code
when a program is
running
View source
What are the two types of iteration in programming?
Count-controlled
iteration
Condition-controlled
iteration
View source
How do some
programming languages
like Python
handle
variable declaration and assignment?
They allow variables to be declared
and
assigned
a
value
in
the same line of code.
View source
Why do longer and more complex programs use programming constructs repeatedly?
Because they require more structured control over the flow of execution
View source
Are spaces allowed in variable names?
No
,
spaces are not allowed in variable names.
View source
How do programming constructs contribute to the complexity of a program?
They
increase
the
structure
and
control
of the program's
execution flow
View source
What is a constant in programming?
A constant allows a
value
to be
assigned
a
name
that cannot be
changed
while the program is
running.
View source
What is the preferred case for letters in variable names?
Lowercase letters are
preferred
, but uppercase letters can be used for
multi-word
names.
View source
Why are constants useful in programming?
They are
declared
and
assigned
once but can be referred to
multiple times
throughout the program.
View source
Why should a variable name be meaningful?
It should
represent
the
value
it is
holding.
View source
What is the first programming construct mentioned in the study material?
Sequence
View source
What is an example of a constant declaration?
const PI
=
3.142
View source
How are statements executed in a sequence?
Statements are executed one after another.
View source
How do constants differ from variables in terms of naming conventions?
Constants
usually follow the same naming conventions as variables but are typically in
uppercase.
View source
What does the term 'sequence' refer to in programming?
It refers to the
order
in which the
statements
are
executed.
View source
Why is the sequence of a program important?
Because carrying out
instructions
in the
wrong
order leads to a program performing
incorrectly.
View source
What is a global variable?
A
global variable
is one that can be
accessed
and
changed throughout
the
program.
View source
How does a programmer declare a global variable?
By using the keyword
'global'
before the variable
name.
View source
What is an example of declaring a global variable?
global ID
=
75
View source
What are local variables confined to?
A
loop
or
subprogram
View source
What is the second programming construct mentioned in the study material?
Selection
View source
What is an advantage of
using
local variables?
They allow the same variable names to be used for different purposes
in
different scopes.
View source
What does selection in programming refer to?
Selection
refers to the
process
of making a
decision.
View source
What is the third programming construct mentioned in the study material?
Iteration
View source
See all 93 cards