




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A comprehensive introduction to python programming, covering fundamental concepts such as input, process, output, algorithms, and data types. It delves into the syntax of python, including variables, operators, and control flow statements. The document also explores essential programming constructs like functions, modules, and object-oriented programming principles. It further introduces key python libraries and their applications in various domains.
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Input A program gets data, perhaps from a file, keyboard, touchscreen, network, etc. Process A program performs computations on that data, such as adding two values like x + y Output A program puts that data somewhere, such as to a file, screen, or network. computational thinking , creating a sequence of instructions to solve a problem algorithm A sequence of instructions that solves a problem Python interpreter a computer program that executes code written in the Python programming language. interactive interpreter a program that allows the user to execute one line of code at a time Code a common word for the textual representation of a program line row of text prompt indicates the interpreter is ready to accept code statement a program instruction Expressions code that return a value when evaluated cariables named references to values stored by the interpreter
print() function that displays variables or expression values '#" character tha denote comments, which are optional but can be used to explains portions of code to a human reader string literal text enclosed in quotes (single or double) and can contain letters, numbers, spaces, or symbols Why would a programmer add end=' ' inside of print()? To keep the output on the same line print(variable_name) without quotes to output the value of a variable \n newline character; output can be moved to the next line whitespace any space, tab, or newline variable = input() reads a user-enter string and changes it into a variable type determines how a value can behave int() converts a string to an integer syntax error violating a programming language's rules on how symbols can be combined to create a program runtime error program's syntax is correct, but the program attemps an impossible operation, such as dividing by zero or multiplying strings together crash Abrupt and unintended termination of a program
a calculation completed by a processor memory circuit that can stors 0s and 1s in each of a series of thousands of addressed locations A ______ computes data. processor _________ stores data. Memory The programmer-created sequence of instructions is call a _______________ or just an app. program application machine instructions instructions represented as 0s and 1s excutable program a sequence of machine instructions together assembly language that translate machine instructions into human readable instructions high-level languages programming using formulas or algorithms scripting language a language tht allows program to be executed withoout compilation script a program whose instructions are executed by another program called an interpreter backward compatible software feature that enables documents saved in an older version of a program to be opened in a newer version of the program variable named item used to hold a value assignment statement assigns a variable with a value identifier (also called a name)
a sequence of letters, underscores, and digits. It must also start with a letter or an underscore object represents a value and is automatically created by the interpreter when executing aline of code garbage collection Deleting unused objects is an automatic process Name binding the process of associating names with interpreter objects module a file containing Python code that can be used by other modules or scripts import the statement used to make a module availble for use dot notation The syntax for calling a function in another module by specifying the module name followed by a dot (period) and the function name. What is one way you know that a file was executed as a script in Python? If the value of name is the string 'main' function list of statements that can be executed simply by referring to the function's name function call process of invoking a function argument item passed to a function ceil(x) round up value factorial(x) factorial (3! = 3 2 1) fmod(x, y) remainder division fabs(x)
radians(x) convert degrees to radians tan(x) tangent cosh(x) hyperbolic cosine sinh(x) hyperbolic sine gamma(x) Gamma function erf(x) error function pi (constant) Mathematical constant 3.141592... e (constant) Mathematical constant 2.718281... unicode represent every possible character as a unique number (code point) \ Backslash () ' Single-quote (') " Double-quote (") \t tab (indent) ord() returns an encoded integer value for a string of length one. chr()
returns a string of one character for an encoded integer container a construct used to group related values together and contains references to other objects intead of data list a container created by surrounding a sequence of vaiable or literals with brackets [ ] element list item See 54 more