Mapa mental
PYTHON
Conteúdo do mapa
PYTHON
>>>
- prompt symbol of the Python console
IDLE
- includes tools for writing and debugging entire programs
/
- single slash to divide numbers produces a decimal (float)
- dividing any two integers produces a float.
- float can be added to an integer, because Python silently converts the integer to a float.
Dividing by zero in Python produces an error, as no answer can be calculated
- the last line of an error message indicates the error's type
Computers can't store floats perfectly accurately
- often leads to bugs
You can chain exponentiations together.
- can rise a number to multiple powers
STRING
- entering text between two single or double quotation marks
- docstrings
- used for block commenting
- double quotes can't be directly included in a double quote string
- placing a backslash
- escape characters
- Backslashes
- to escape tabs, arbitrary Unicode characters, and various other things that can't be reliably printed
- Backslashes
OUTPUT
- programs take input and process it to produce output
- print function to produce output
- When a string is printed, the quotes around it are not displayed
INPUT
- input function
- function prompts the user for input, and returns what they enter as a string
- input function
CONCATENATION
- strings in Python can be added
- can be done on any two strings.
- doesn't matter whether they've been created with single or double quotes.
- strings in Python can be added
STRING OPERATIONS
- Strings can also be multiplied by integers
- Strings can't be multiplied by other strings
- Strings also can't be multiplied by floats
TYPE CONVERSION
- can't add two strings containing the numbers 2 and 3 together to produce the integer 5
- operation will be performed on strings, making the result '23
- would use the int function
- operation will be performed on strings, making the result '23
- turning inputs to floats
- can't add two strings containing the numbers 2 and 3 together to produce the integer 5
Informações
- Descrição
- Mapa Mental sobre PYTHON, criado por Emilia Sparta em 30-10-2018.
- Criado por
- Emilia Sparta · out 2018
- Atualizado
- 30 out 2018
- Visualizações
- 0
- Avaliação