Python Programming Grammar Flashcards
List
A collection of data of one or more types within square brackets
[“hello”, 0, 1.5, 3]
Quotient
A quotient is the number obtained by dividing one number by another. It can be an int or float.
For example, if you divide 6 by 3, you get 2, which is the quotient.
It is the answer from the division process.
Remainder (modulus) %
After you divide two numbers and get the quotient. The number left over is called the remainder.
Modulus (or “mod”, for short) returns the remainder of dividing one number by another number. e.g. 15 % 10 will return 5.
Difference between quotient and the remainder (modulus)
The number of times we have subtracted is called the quotient (of the division of by ) The number that is leftover from after subtracting as often as possible is called the remainder (of the division of by ).
In integer division and modulus, the dividend is divided by the divisor into an integer quotient and a remainder. The integer quotient operation is referred to as integer division, and the integer remainder operation is the modulus.
Dividend
The number that you are dividing
Division in Python
The dividend, divisor, quotient and remainder.
In Division, the number which we divide is called the dividend. The number by which we divide is called the divisor. The result obtained is called the quotient. The number left over is called the remainder.
Divisor
The number by which we divide is called the divisor.
Float
Real value (decimal) Also known as floating-point number
Integer / Int
A number with no decimal
A whole number
String / Str
A collection of characters within single or double quotes
“hello”, ‘hello’
Truncate / /
Shorten the duration or extent of
Look for other definitions. This one seems lacking.
Syntax
the arrangement of words and phrases to create well-formed sentences in a language.
a set of rules for or an analysis of the syntax of a language.
plural noun: syntaxes
“generative syntax”
the branch of linguistics that deals with syntax.
Packages
Researchers, mathematicians, and data scientists in particular like Python because of its rich and easy to understand syntax and the wide range of open-source packages available. Packages are commonly used, shared code libraries that are freely available for anyone to use.
Learning the pythonic way
Python is supported by an active user community that is eager to help new programmers learn the Pythonic way, where you don’t just get the syntax right, but use the language the way it was intended.
Python is an interpreted language which reduces the ____________
Because there’s no _______________.
- edit-test-debug cycle
2. no compilation step required.