What Python command displays information on the screen?
print()
What data type is the number 15?
Integer
What symbol represents multiplication in Python?
*
What symbol begins a single-line comment in Python?
#
What is a programming language used to give computers?
Instructions
What do we call a named storage location for information in a program?
A variable
What data type is the number 6.8?
Float
What operator finds the remainder after division?
%
What does the Python interpreter do with comments?
Ignores them.
What type of language determines variable types while the program runs?
What are three characteristics of a variable?
Name, Type, and Value
What Python function collects information from a user?
input()
What will print("Hi" + "There") display?
HiThere
Improve readability, remember their work, or help teammates understand code.
What type of language uses declared or checked variable types?
Statically Typed
What data type stores text or a sequence of characters?
String
What Python function converts a value into an integer?
int()
What will print ("Go" * 3) display?
GoGoGo
What is wrong with this code: print "Hello"?
It is missing parentheses.
What is one difference between compiled and interpreted languages?
Compiled code is translated before execution; interpreted code is executed through an interpreter.
What is the difference between = and == in Python?
= assigns a value; == compares values
Why must user input be converted before using it in a mathematical calculation?
Because input is initially stored as a string.
10
Why should programmers test their programs with different inputs?
To find errors and make sure the program works correctly.
How many user inputs were required in the Mad Libs project, and what had to happen to every input?
At least 12, and every input had to appear in the story.