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
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller julianah420. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.99. You're not tied to anything after your purchase.