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
Hello
B
World
C
Hello World
D
HelloWorld
2) A statement is...
A
A line of code that ends with a period
B
A line of code that begins with a # mark
C
A way to make your code more fashionable
D
A line of code that performs some action
3) What does the print( ) command do?
A
It causes text output to appear in the console
B
It adds the symbols ( ) to the end of a line
C
It gets text input from the user
D
It turns on the printer
4) int( ) is an example of what type of command?
A
Interior
B
Typecasting
C
Output
D
Concatenation
5) What is the data value type of 12.88
A
float
B
string
C
print
D
integer
6) To typecast an integer to a string you would wrap it in what function?
A
print()
B
float()
C
int()
D
str()
7) By default, user input is what data type?
A
print
B
string
C
integer
D
float
8) Can you concatenate a string and a float in the same print statement?
A
Yes
B
No
C
Yes, if you typecast the float to a string
9) What is a variable?
A
The place where output appears
B
A type of string literal
C
A container that holds information
D
The difference between two values
10) float( ) is an example of what type of command?
A
concatenation
B
typecast
C
output
D
math
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
Hello + World
B
days += 7
C
x = 8
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
it could be any of them above
C
string
D
integer
13) Which of the following is NOT an operator?
A
%
B
*
C
+=
D
print()
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?