Python Flashcards
What is Python?
It is a computer language, used to create various types of applications
What is an IDE?
This is an environment that enables development of python programs
Describe how an interpreter works
It works by reading and analyzing code LINE by LINE from top to bottom
What does an interpreter do when it encounters an error?
It may stop what it is doing and let you know about the error
Describe how a compiler works
It runs the code from top to bottom and shows everything including the results at once
producing an executable file
What are Integers
These are natural numbers that have one or a combination of digits
What is an example of an integer
9886867 or 1,2456,93 or any number
What is a string?
A string is a character or a group of characters considered in one unit
Create a string in the parentheses of
print()
print(“whatever”)
What is a floating - point number?
Is a number made in one or two parts
What is an operator and operation
Operator-Is a symbol that acts one one or two values
Operation- A group of items that, when used together, must produce a result.
What is an operand?
The value participating in operations
When is floor division used?
When you are not interested in the fractional part of the result
symbol is - //
Where is % used ?
In remainders ,after division has been perfomed.
What is a comment?
It is text written in a document but that isn’t considered as code
How do you create a comment
By starting with a # and creating a one line sentence
What indicates the end of a statement?
semi-colon
What is parentheses?
Used to create an isolated section that must be empty or have a list of items
What can be used to isolate a particular operation?
parentheses
How do you make a multi-line comment?
Use of 6 double quotes
3 in the opening and 3 at the end
What is escape sequence?
Is a special character that displays non-visibility
How is escape sequence represented?
By a backslash character
hwta is inferred language
the value you assign to a variable can be read by compilier to know what variable it is