






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







Prompt - ANSWER-Informs the programmer that the interpreter is ready toaccept commands.
Line - ANSWER-A row of text. statement - ANSWER-is a program instruction. Expressions - ANSWER-code that return a value when evaluated variables - ANSWER-named references to values stored by the interpreter. syntax error - ANSWER-is to violate a programming language's rules on howsymbols can be combined to create a program.
Python interpreter - ANSWER-a computer program that executes code writtenin the Python programming language
interactive interpreter - ANSWER-a program that allows the user to executeone line of code at a time.
Interpreter - ANSWER-A program that executes computer code. Code - ANSWER-The text that represents a computer program. program, application, or just app - ANSWER-The programmer-created sequenceof instructions
Compiler - ANSWER-Translates a high-level language program into low-levelmachine instructions.
Application - ANSWER-Another word for program. The programmer-created sequence of instructions is called a program,application, or just app.
machine instruction - ANSWER-0s and 1s are hard to comprehend. Mostprogrammers specify the program's functionality in a high-level language, which is then automatically translated to low-level machine instructions. assembly language - ANSWER-Human-readable processor instructionsAn assembler is a program that translates assembly language instructions into machine instructions. operating system - ANSWER-Manages programs and interfaces withperipherals.
cache - ANSWER-Relatively small, volatile storage with fastest access located onprocessor chip.
type conversion - ANSWER-is a conversion of one type to another, such as anint to a float. locals() - ANSWER-Returns a dictionary of the names found in the localnamespace
scope resolution - ANSWER-The process of searching namespaces for a name. default parameter value - ANSWER-a parameter in the function definition,allowing calls to the function to omit an argument for that parameter.
docstring - ANSWER-a string literal placed in the first line of a function body, asshown below.
implicit conversion - ANSWER-is a type conversion automatically made by theinterpreter, usually between numeric types.
string formatting expression - ANSWER-allows a programmer to create a stringwith placeholders that are replaced by the value of variables called conversion specifier function stubs - ANSWER-function definitions whose statements haven't beenwritten yet.
NotImplementedError - ANSWER-indicates that the function is notimplemented and causes the program to stop execution
namespace - ANSWER-maps names to objects.
scope - ANSWER-The area of code where a name is visible. conversion specifier - ANSWER-A placeholder for a value in a string. conversion type - ANSWER-Determines how to display a value assigned to aconversion specifier
minimum field width - ANSWER-Optional component that determines thenumber of characters a conversion specifier must insert
'0' conversion flag - ANSWER-Optional component that indicates numericconversion specifiers should add leading 0s if the minimum field width is also specified precision - ANSWER-Optional component that determines the number of digitsto include to the right of a floating point value raise statement - ANSWER-auses immediate exit from the try block and theexecution of an exception handler
try - ANSWER-Describes a block of code that uses exception-handling except NameError - ANSWER-An exception handler for NameError exceptions except(ValueError, NameError) - ANSWER-An exception handler for ValueErrorand NameError exceptions
except - ANSWER-A catch-all exception handler
f1.read() - ANSWER-read a file into a string f1.write("hello!") - ANSWER-writes to a file f1.readline() - ANSWER-reads next line f1.close() - ANSWER-closes a file (must always close a file!) with open("/my_file...etc) as f: - ANSWER-opens, allows work, andautomatically closes a file
timedelta - ANSWER-time library function to calculate time amounts from datetime import timedelta - ANSWER-grabs timedelta from the datetimelibrary
import datetime as dt - ANSWER-imports a library as a specified variable datetime.date.today().month - ANSWER-to print current month (aka .day or.year for those)
beautiful soup - ANSWER-HTML parsing library NumPy - ANSWER-scientific computing, matrices, array creation library pandas - ANSWER-data manipulation and analysis library
pillow (PIL) - ANSWER-work with and manipulate images; python imaginglibrary
pyglet - ANSWER-multimedia / gaming creation library pytz - ANSWER-time zone data library pip installimport a library into your code import - ANSWER-to install and
math.ceil() - ANSWER-round down (4.5 = 4, 4.8 = 4, 4.1 = 4, 4.9 = 4) math.floor() - ANSWER-round up (4.6 = 5, 4.7 = 5, 4.1 = 5, 4.2 = 5) datetime.date.today() - ANSWER-get today's date datetime.date.(1967, 9, 7) print(mybday.strftime("%A")) - ANSWER-gets the day of the week math.factorial() - ANSWER-multiplies each number in argument to give answer math.exp() - ANSWER-return e raised to power of (x) (natural log) os.chroot() - ANSWER-change the root directory of current process path os.remove() - ANSWER-remove/delete the file path math.sqrt() - ANSWER-return square root of x
PIL.image.save() - ANSWER-saves an image in a given filename pandas.describe() - ANSWER-generates descriptive statistics, stats summary pandas.series() - ANSWER-dataframe; 2 dimensional labeled data structure slicing (with 9 elements, grabbing the first 3) - ANSWER-my_list[:3] upperbound is exclusive
slicing(with 9 elements, grabbing the last 3) - ANSWER-my_list[6:] lower boundis inclusive
slicing(with 9 elements, grabbing middle 3) - ANSWER-my_list[3:6] mylist.count() - ANSWER-counts how many times that item appears mylist.remove() - ANSWER-removes item in a list; example - (0) removes 1stelement
mylist.reverse() - ANSWER-reverses the items in a list mylist.pop() - ANSWER-removes last item in list mylist.pop(3) - ANSWER-removes 4th item in list
mylist.index(str or int) - ANSWER-finds that specific item in list and returns it'sindex syntax to add element to a set - ANSWER-myset.add("item") syntax to add element to the end of a list - ANSWER-mylist.append("item") syntax to add element to a specific spot in a list - ANSWER-mylist.insert(index,"item")
syntax to create a dictionary - ANSWER-mydictionary = {"Elise": 67, "Carlos":66,"Jacquie":92}
myset.pop() - ANSWER-removes a random element since set are not in anyspecific order
tuple syntax - ANSWER-dimensions = 50, 40, 20 formating - ANSWER-print("The ages are {}, {}, and {}.".format(age1, age2,age3))
syntax to get a specific value in a dictionary - ANSWER-mydictionary.get("Elise)will return 67 or print(mydictionary["Elise"] will print 67