Python glossary
(Created page with "Back to Python A value is one of the fundamental things — like a word or a number — that a program manipulates objects are classified into different classes, or data t...") |
|||
Line 12: | Line 12: | ||
The int function can take a floating point number or a string, and turn it into an int | The int function can take a floating point number or a string, and turn it into an int | ||
+ | A statement is an instruction that the Python interpreter can execute. | ||
+ | We have only seen the assignment statement so far. Some other kinds of statements | ||
+ | that we’ll see shortly are while statements, for statements, if statements, and import statements. | ||
+ | (There are other kinds too!) | ||
+ | |||
+ | An expression is a combination of values, variables, operators, and calls to functions. | ||
+ | Expressions need to be evaluated. If you ask Python to print an expression, the interpreter evaluates the expression and displays the result. | ||
Back to [[Python]] | Back to [[Python]] |
Revision as of 13:04, 1 May 2013
Back to Python
A value is one of the fundamental things — like a word or a number — that a program manipulates
objects are classified into different classes, or data types: 4 is an integer, and "Hello, World!" is a string
The type converter float can turn an integer, a float, or a syntactically legal string into a float
The int function can take a floating point number or a string, and turn it into an int
A statement is an instruction that the Python interpreter can execute. We have only seen the assignment statement so far. Some other kinds of statements that we’ll see shortly are while statements, for statements, if statements, and import statements. (There are other kinds too!)
An expression is a combination of values, variables, operators, and calls to functions. Expressions need to be evaluated. If you ask Python to print an expression, the interpreter evaluates the expression and displays the result.
Back to Python