Introduction To Python Flashcards
(45 cards)
Input
A program receives data from a file, keyboard, touchscreen, etc.
Process
A program performs computations on that data.
Output
A program puts that data somewhere, such as a file, screen, or network.
What does a program consist of?
A list of instructions performed one at a time. Basic instructions are input, process and output.
Variables
Names that link to values stored in memory.
Computational thinking
Creating a sequence of instructions to solve a problem.
Algorithm
A sequence of instructions.
Interpreter
A program that interprets a script without compiling it before hand. Executing the script as it reads through.
Interactive interpreter
A program that allows users to execute one line of code at a time.
Code
Term for the text representation of a program.
Line
A row of text
Prompt
The ‘»>’. Indicates the interpreter is ready to accept code.
Statement
A program instruction.
Expression
Codes that return a value when evaluated. (x + y). Cannot have the = operator.
Assignment
Code where a variable receives a value.
Print()
Displays variables or expression values or string literals. Starts a new line.
Comments
Text that doesn’t affect the program. Begins with a hashtag (#).
\n
Forces a line break. (A new line)
Named the newline character. Can work even in a string literals.
Whitespace characters
Space, tab and newline
Input()
A function that takes text from the user. Default type is string, but can be changed by placing input in the functions int(), float(), etc.
Input prompt
Can be done by writing text in input(). Prints the string in between the parentheses where the user will type their text.
Syntax error
A violation of a programming language’s rules on how code is written.
Good coding practice
Run the code frequently to verify whether you’ve made errors to prevent having to search through your entire script.
Runtime error
The syntax is correct, but the program attempts an impossible operation.