Introduction to Computer Programming
(Quiz questions Exam 1)
C. A String - answer What kind of information is being stored in the variable x?
x = "1005"
A. An integer
B. A floating point
number
C. A String
C. your grade = 98 - answer Which of the following is both a good and valid variable
name?
A. 3rdAve = "Bowery"
B. my name = "Sally"
C. your_grade = 98
D. greeting! = "Hi, there!"
E. x = "John"
F. time? = 4.00
G. "my name" = "Mary"
C. your_grade = 98 - answerConsider the following statement in Python:
a = 123
The variable 'a' is storing a:
A. A string
B. A numeric value
C. A logical value
A. A programmatic construct that lets the programmer store information during the
execution of a program - answerA "variable" is:
A. A programmatic construct that lets the programmer store information during the
execution of a program
B. A sequence of numbers that represents numeric information
C. A sequence of characters that represents textual information
D. A reusable command that the programmer can "call" to execute a series of
statements
, False - answerYou would use Python's "Interactive Mode" to write a long program that
contains many lines of code.
True
False
True - answerPython supports two different division operators
True
False
C. x = 1000 - answerAssume you wanted to perform some mathematical calculation
using the variable "x" (such as adding 5 to its value) - which line of code would allow
you to do this?
A. x = "1000"
B. x = "one thousand"
C. x = 1000
B. Argument - answerConsider this statement in Python:
print ("One", "Two", "Three")
"One" is considered a/n:
A. The name of a function
B. Argument
C. A numeric literal
D. A variable
A. True - answerThe following variable "answer" will have a floating point number stored
as its data type: answer = 4.0 + 2 * 2 - 5
A. True
B. False
A. one - answerHow many arguments does the "input" function expect to receive?
A. one
B. two
C. zero
D. any number of arguments
D. Interactive - answermagine that you have a single line of Python code that reads:
print ("Hello, world!")
If you wanted to run this statement and immediately see the result you could do so by
using __________ mode in IDLE.
A. Functional
B. Object Oriented
(Quiz questions Exam 1)
C. A String - answer What kind of information is being stored in the variable x?
x = "1005"
A. An integer
B. A floating point
number
C. A String
C. your grade = 98 - answer Which of the following is both a good and valid variable
name?
A. 3rdAve = "Bowery"
B. my name = "Sally"
C. your_grade = 98
D. greeting! = "Hi, there!"
E. x = "John"
F. time? = 4.00
G. "my name" = "Mary"
C. your_grade = 98 - answerConsider the following statement in Python:
a = 123
The variable 'a' is storing a:
A. A string
B. A numeric value
C. A logical value
A. A programmatic construct that lets the programmer store information during the
execution of a program - answerA "variable" is:
A. A programmatic construct that lets the programmer store information during the
execution of a program
B. A sequence of numbers that represents numeric information
C. A sequence of characters that represents textual information
D. A reusable command that the programmer can "call" to execute a series of
statements
, False - answerYou would use Python's "Interactive Mode" to write a long program that
contains many lines of code.
True
False
True - answerPython supports two different division operators
True
False
C. x = 1000 - answerAssume you wanted to perform some mathematical calculation
using the variable "x" (such as adding 5 to its value) - which line of code would allow
you to do this?
A. x = "1000"
B. x = "one thousand"
C. x = 1000
B. Argument - answerConsider this statement in Python:
print ("One", "Two", "Three")
"One" is considered a/n:
A. The name of a function
B. Argument
C. A numeric literal
D. A variable
A. True - answerThe following variable "answer" will have a floating point number stored
as its data type: answer = 4.0 + 2 * 2 - 5
A. True
B. False
A. one - answerHow many arguments does the "input" function expect to receive?
A. one
B. two
C. zero
D. any number of arguments
D. Interactive - answermagine that you have a single line of Python code that reads:
print ("Hello, world!")
If you wanted to run this statement and immediately see the result you could do so by
using __________ mode in IDLE.
A. Functional
B. Object Oriented