Review Game Zone
Flash Cards
(current)
Games
Teachers
Search
Unit 1
Test Description: TechSmart Unit 1 Review
Instructions: Answer all questions to get your test result.
1) After this code executes, what is the value of the variable foo? foo = input(Hello) foo = World
A
HelloWorld
B
World
C
Hello World
D
Hello
2) A statement is...
A
A line of code that ends with a period
B
A way to make your code more fashionable
C
A line of code that performs some action
D
A line of code that begins with a # mark
3) What does the print( ) command do?
A
It causes text output to appear in the console
B
It turns on the printer
C
It adds the symbols ( ) to the end of a line
D
It gets text input from the user
4) int( ) is an example of what type of command?
A
Output
B
Typecasting
C
Interior
D
Concatenation
5) What is the data value type of 12.88
A
string
B
integer
C
float
D
print
6) To typecast an integer to a string you would wrap it in what function?
A
int()
B
float()
C
str()
D
print()
7) By default, user input is what data type?
A
integer
B
print
C
float
D
string
8) Can you concatenate a string and a float in the same print statement?
A
Yes, if you typecast the float to a string
B
No
C
Yes
9) What is a variable?
A
A type of string literal
B
A container that holds information
C
The difference between two values
D
The place where output appears
10) float( ) is an example of what type of command?
A
concatenation
B
output
C
math
D
typecast
11) Which of the following pieces of code is an expression (produces a value)? Hint: An expression is partial code. It produces a value , but does nothing with it.
A
x = 8
B
Hello + World
C
days += 7
D
print(The value is 1)
12) In the following code statement, what is the data type of var? new_var = var + var
A
float
B
string
C
integer
D
it could be any of them above
13) Which of the following is NOT an operator?
A
+=
B
%
C
print()
D
*
14) What is the correct operator to increment
A
=
B
==
C
+=
D
-=
*select an answer for all questions
Check Results & Get Answers
Play Games with the Questions Above
Teachers: Create FREE classroom games with your questions
Click for more info!
©2007-2024
ReviewGameZone.com
|
About
|
Privacy
|
Contact
|
Terms
|
Site Map
WAIT! Find what you needed?
×
Still Looking for the Answers?
Have Another Question?
Play a Review Game with These Questions?
Want to Make Your Own Test Like This One?