Questions and CORRECT Answers
What type of language is python - CORRECT ANSWER An interpreted language
Interpreted language - CORRECT ANSWER Code that is translated one line/instruction at
a time.
Is compilation or interpretation typically faster? - CORRECT ANSWER Translated
compiled code tends to run faster, whereas the compilation itself takes longer.
Does the end-user need a compiler? - CORRECT ANSWER No
Does the end-user need an interpreter? - CORRECT ANSWER Yes
How is compiled code stored? - CORRECT ANSWER It is stored in machine language
How is interpreted code stored? - CORRECT ANSWER In the programming language
Where can python functions come from? - CORRECT ANSWER They can be built into
the language, be user defined, or imported from modules
Can several things occur on the same line - CORRECT ANSWER NO
What happens when you dont pass arguments to print() - CORRECT ANSWER When you
don't pass arguments to print(), it will just output a new line. You can also use the escape
character \n.
How do you print a slash in a print statement - CORRECT ANSWER Double it up, \\
, How do you print quotation marks in a print statement? - CORRECT ANSWER print(' " ')
What is a keyword argument - CORRECT ANSWER An argument unaffected by its
position
What are the keyword arguments for the print statement - CORRECT ANSWER end, sep
Where do keyword arguments go? - CORRECT ANSWER After the positional argument
What is a positional argument - CORRECT ANSWER An argument that is dictated by its
position
What is a literal - CORRECT ANSWER A literal is a sequence of characters used in a
program to represent a constant value.
Is a char or string a literal in python? - CORRECT ANSWER NO
Python literals - CORRECT ANSWER integer, floating point. An int has no dots.
Can you use underscores in a literal? - CORRECT ANSWER Yes
Booleans - CORRECT ANSWER True 1, False 0
How to determine int or float in arithmetic? - CORRECT ANSWER When both arguments
are integers, the result is an int. If any arguments are floats, the end result will be a float.