Week 2 Ch2 Flashcards
(36 cards)
What is an integer value?
A number value
What is a floating point?
Decimal integer
What is a string value?
String of characters
In python strings belong to what type?
Str
In Python integers belong to what type?
Int
In python flouncing points belong to what type?
Float
If numbers are in quotation marks. are they still strings?
Yes they are considered strings in Python
What do commas do in Python?
Think it is a list of separated values
What is a variable?
Name that refers to a value
What is a common way to represent variables on paper?
Write the name with arrow pointing to variables value.
Type of a variable is the type of ______it refers to
Value
What do variable names have to begin with?
A letter
If you give a variable an illegal name what happens ?
Syntax error
Can variable names contain illegal characters?
No they cannot
Can variable names contain Python keywords?
No they cannot
What is a value?
Something a program manipulates
What is an expression?
It is a combination of values, variables, and operators
What is a statement?
Unit of code that Python interpreter can execute
What is the difference between an expression and statement?
Expression has a value
Order of evaluation depends on what?
Rules of precedence
What has the highest precedence?
Parentheses
What is after parentheses in the order of precedence?
It is exponents
What precedence do multiplication and division have?
They have the same precedence
Operators with the same precedence are evaluated in what order?
Left to right