NOTE IT DOWN ✏ About Python Programming Language
✏NOTE: In Python Programming Language Explained ByPython Programming By DDSRY ,
- The last line of an error message indicates the error’s type.
- Read error message carefully, because it tells you how to fix a program.
- Computers can’t store floats perfectly, in the same way that we can’t write down the complete decimal expansion of 11/3 (3.6666666666666). Keep this in mind, because it often leads to infuriating bugs!
- Remember: Dividing any two integers produces a float.
- A float is also produced by doing an operation on two floats, or on a flaots and an integers.
- Exponentiation in Python: means, raising of one number to the power of another. This operation is performed using two ** asteriks.
- Remember: You can raise a number to multiple powers.
- for ex: 2**5**8 Remember: When the Python console displays a string, it generally uses single quotes.
- Remember: \n represent a new line.
- Question : Howto write string on a newline without \n ?
- Create a string with three sets of quotes ( three single or double quotes), and newlines will created by pressing enter.
- And in output, You can see that the \n was automatically put in the output, when we pressed Enter.
- NOTE: Concatenation in Python: if you add strings with numbers you will get error, but if you write number under quotes then it will consider as strings (number will become string), then you can add string with number.
- Keep this in mind: - Strings can not be multiplied by other strings. - Strings can not be multiplied by floats.
- Remember: - In Python, you can assign (store) a strings to a variable, and later you can change the value which you have stored and you can assign an integers to the same variable.
- NOTE: - Python is a case sensitive programming languague. - Phone_number and phone_number are two different variable names in Python.
- Question : How to remove (delete) variable in Python ? - use the del (variable_name) statement to remove a variable in Python.
- Keep this in mind: - assignment operator = is used to assign value to a variable.
- Comparison operator == is used to compare two values.
- Indentation in Python:
- Python use indentation ( 4 white space at the beginning of a line ) - Python Indentation is mandatory because, program won’t work without it.
#DDSRY #RememberThisAboutPythonPrograming
⬇️