Section 1

Preview this deck

Python interpreter

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (42)

Section 1

(42 cards)

Python interpreter

Front

Can load and execute python code saved in files.

Back

Indentation error

Front

The lines of the program are not properly indented.

Back

Front

Valid or not valid? x = y + 2

Back

Front

Valid or not valid? x = 1

Back

Prompt

Front

Informs the programmer that the interpreter is ready to accept commands.

Back

Python interpreter

Front

a computer program that executes code written in the Python programming language.

Back

NameError

Front

The program tries to use a variable that does not exist.

Back

Front

Valid or not valid? x + y

Back

~x

Front

Bitwise NOT

Back

*

Front

Multiplication

Back

-

Front

Subtraction

Back

The print() function

Front

displays variables or expression values.

Back

/

Front

Division

Back

==

Front

The equality operator (sometimes read: "equal equal") is used to compare two values, and returns a Boolean (true/false). Avoid confusion with the assignment operator "=",

Back

Value Error

Front

An invalid value is used - can occur if giving letters to int().

Back

Variables

Front

Store values for later use. Used to refer to values saved in memory by the interpreter.

Back

+

Front

Addition

Back

Line

Front

a row of text

Back

logic error (bug)

Front

an error that occurs while a program runs

Back

%

Front

Modulus

Back

Front

Valid or not valid? x + 1 = 3

Back

Interactive interpreter

Front

a program that allows the user to execute one line of code at a time.

Back

# characters

Front

denote comments, which are optional but can be used to explain portions of code to a human reader

Back

Expressions

Front

code that return a value when evaluated

Back

+x

Front

Unary plus

Back

()

Front

Parentheses

Back

Expressions

Front

Code that yield a value when evaluated, such as 20 * 40, which yields the value 800.

Back

-x

Front

Unary minus

Back

The interactive interpreter

Front

displays a prompt (">>>") that indicates the interpreter is ready to accept code.

Back

input()

Front

Reading input is achieved using this function

Back

Statement

Front

A program instruction.

Back

bug

Front

logical error

Back

whitespace

Front

any blank space or newline

Back

**

Front

Exponent

Back

Code

Front

a common word for the textual representation of a program (and hence programming is also called coding). The text that represents a computer program.

Back

Front

Valid or not valid? x = y

Back

TypeError

Front

An operation uses incorrect types - can occur if adding an integer to a string.

Back

<<, >>

Front

Bitwise shift operators

Back

&

Front

Bitwise AND

Back

^

Front

Bitwise XOR

Back

I

Front

Bitwise OR

Back

//

Front

Floor division

Back