






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 to accept 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 how symbols can be combined to create a program. Python interpreter - ANSWER-a computer program that executes code written in the Python programming language interactive interpreter - ANSWER-a program that allows the user to execute one line of code at a time.
Instant PDF Download
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 sequence of instructions Compiler - ANSWER-Translates a high-level language program into low-level machine 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. Most programmers 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 instructions An assembler is a program that translates assembly language instructions into machine instructions. operating system - ANSWER-Manages programs and interfaces with peripherals. cache - ANSWER-Relatively small, volatile storage with fastest access located on processor chip.
type conversion - ANSWER-is a conversion of one type to another, such as an int to a float. locals() - ANSWER-Returns a dictionary of the names found in the local namespace 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, as shown below. implicit conversion - ANSWER-is a type conversion automatically made by the interpreter, usually between numeric types. string formatting expression - ANSWER-allows a programmer to create a string with placeholders that are replaced by the value of variables called conversion specifier function stubs - ANSWER-function definitions whose statements haven't been written yet. NotImplementedError - ANSWER-indicates that the function is not implemented 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 a conversion specifier minimum field width - ANSWER-Optional component that determines the number of characters a conversion specifier must insert '0' conversion flag - ANSWER-Optional component that indicates numeric conversion specifiers should add leading 0s if the minimum field width is also specified precision - ANSWER-Optional component that determines the number of digits to include to the right of a floating point value raise statement - ANSWER-auses immediate exit from the try block and the execution 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 ValueError and 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, and automatically closes a file timedelta - ANSWER-time library function to calculate time amounts from datetime import timedelta - ANSWER-grabs timedelta from the datetime library 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 imaging library pyglet - ANSWER-multimedia / gaming creation library pytz - ANSWER-time zone data library pip install ____________ import _______________ - ANSWER-to install and import a library into your code 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] upper bound is exclusive slicing(with 9 elements, grabbing the last 3) - ANSWER-my_list[6:] lower bound is 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 1st element 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's index 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 any specific 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