stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Unit 4, 5, and 6 Test Flashcards | StudBud
Explore
/
Unit 4, 5, and 6 Test
Unit 4, 5, and 6 Test
33 terms
·
StudBud Administration
·
64 plays
Python Unit 4, 5, and 6
Flashcards
33 cards
F
Practice quiz
P
Host live
L
Questions
33
Answers
1
Which answer is an example of a binary operation?
2+2
-2
2
0
2
When running the following program what will print if the user types in the Name "JOE".
<class 'str'>
name
Error
JOE
3
What symbol represents integer division in python?
\
-
/
(
4
What will the following program print?
a3
Error
aaaa
aaa
5
You may only use these two operators with a string.
+, *
-,+
+, -
-.**
6
An integer is most likely defined as?
Any Number with a decimal vlue or fraction
Something that contains a number that cna be postive, negative, or zero
Something that contains a number that can only be negative.
Something that contains a number that can only be a postive
7
Which example does not accurately represent a string?
" "
Hello World
"hello world"
"ABC123"
8
When should we use comments?
never
sometimes
during a full moon
Always
9
Which of the following best represents an assignment satement?
my_number=90
my_number-90
my_number/90
my_number==90
10
Which answer represents a variable statement as a string
my_name=<bob>
my_name=bob
my_name="bob"
my_name=(bob)
11
Which of the following examples does NOT represent a floating point number?
-1.3
1/4
5.44444
0.0
12
Which of the following represents a Unary operation?
2-6
-3
2+2
3*4
13
What symbol represents multiplication in python?
+
*
=
/
14
A variable is most likely defined as
Something that is stored in a program, but can not be used later
Something that is already programmed and can not used.
Something that stores info in a program so that it can be used later
Something that is constant within your program
15
Which answer represents the abbreviation for integer?
int
#
integ
num
16
Define concatenation
Adding two strings together
dividing two strings.
multiplying two strings
subtracting two strings
17
A String is most likely defined as?
Numbers with a decimal value
Information that contains text or a sequence of zero or more characters
Information that contains a set of numbers
Number with out a decimal
18
What answer best represents the abbreciation for a Floating-Point- Number?
flo
float
Flow
point
19
User inputs in python need a way to ____ and ____ information?
Retrieve, store
store, create
create, print
buy, sell
20
Which of the following would NOT be considered a Type?
Float
Integer
String
Value
21
What symbol represents exponentiation in python?
+
-
*
**
22
Which answer is not an integer?
0
1.4
10
-2323422
23
What answer would best represent an input in python?
nam=input("give me a name")
nam=("give me a name")input
nam=input"give me a name"
nam=in("give me a name")
24
Which of the following is NOT a good example for a name?
7 age
age_my
age
my_age
25
What will the following program print?
Error
4
print
2
26
Single Line comments are used to?
Provide a Biography of the author
Print authors name
Describe individual steps through out the program
Explains an error in the program
27
How many parts are there in an assignment statement?
1
2
3
4
28
An input is most likely defined as?
A function that only prints things the computer wants to print.
A type that is used to evaluate variables
A type of error in programming
A function that prints a prompt and retrieves infromation from the user.
29
Which answer best represents the abbreviation for the type String?
stng
int
str
sti
30
An assignment statement is used to?
Assign a vlue to a name
Assign only a print statement
Assign a style to a program
Assign an integer to a float
31
What are the three parts that make up a variable statement or assignment statement?
Integer, Float, String
Value, Constraints, Numbers
Type, Name, Constant
Name, Type, Value
32
Which symbol do we use to create a multi line comment
" "
$
""" """
#
33
What symbol do we use to create a single line comment?
""" """
" "
#
&