C173 Intro To Computer Programming / Basic
Constructs Of Programming / Exam Latest Update
Which is a named item used to hold a value? - ANSWER Variable
What are we referring to when we talk about "Grammar" in programming? -
ANSWER A programming language's strict programming rules for structure
Think Rules
Which of the following are valid expressions?
1. num = num != 5
2. 3
3. 8 + 8
4. x = 5 + 5 * (10+) - ANSWER 2. 3
3. 8+8
Which are assignment statements?
x=x*2
x=x+2
x >= 1
x == 1
x=1
x <= 1 - ANSWER X= X * 2
X= X + 2
X=1
,What type of data is being used?
"true" - ANSWER String - Because of the quotations
What type of data is being used?
7 - ANSWER Integer
What type of data is being used?
true - ANSWER Boolean
What type of data is being used?
7.0 - ANSWER Float
What type of data is being used?
"7" - ANSWER String
What type of data is being used?
"7.0" - ANSWER string
Grace's website asks users to confirm that they agree to the use of cookies
and then records their answer. Which type of data is best suited to hold this
confirmation?
boolean
string
float
integer - ANSWER Boolean
Which type of data holds only whole number values?
string
boolean
float
integer
array - ANSWER Integer
, Which type of data holds decimal values?
string
boolean
float
integer
array - ANSWER Float
Which type of data holds a sequence of characters?
array
string
float
boolean
integer - ANSWER String
Which type of data holds an ordered list of items?
string
boolean
integer
array
float - ANSWER Array
Which type of data holds only two possible values?
boolean
array
integer
string
float - ANSWER Boolean
Which operator evaluates the remainder of division?
//
%
/
*
+ - ANSWER %
Constructs Of Programming / Exam Latest Update
Which is a named item used to hold a value? - ANSWER Variable
What are we referring to when we talk about "Grammar" in programming? -
ANSWER A programming language's strict programming rules for structure
Think Rules
Which of the following are valid expressions?
1. num = num != 5
2. 3
3. 8 + 8
4. x = 5 + 5 * (10+) - ANSWER 2. 3
3. 8+8
Which are assignment statements?
x=x*2
x=x+2
x >= 1
x == 1
x=1
x <= 1 - ANSWER X= X * 2
X= X + 2
X=1
,What type of data is being used?
"true" - ANSWER String - Because of the quotations
What type of data is being used?
7 - ANSWER Integer
What type of data is being used?
true - ANSWER Boolean
What type of data is being used?
7.0 - ANSWER Float
What type of data is being used?
"7" - ANSWER String
What type of data is being used?
"7.0" - ANSWER string
Grace's website asks users to confirm that they agree to the use of cookies
and then records their answer. Which type of data is best suited to hold this
confirmation?
boolean
string
float
integer - ANSWER Boolean
Which type of data holds only whole number values?
string
boolean
float
integer
array - ANSWER Integer
, Which type of data holds decimal values?
string
boolean
float
integer
array - ANSWER Float
Which type of data holds a sequence of characters?
array
string
float
boolean
integer - ANSWER String
Which type of data holds an ordered list of items?
string
boolean
integer
array
float - ANSWER Array
Which type of data holds only two possible values?
boolean
array
integer
string
float - ANSWER Boolean
Which operator evaluates the remainder of division?
//
%
/
*
+ - ANSWER %