Mindmap
Python
Inhalt der Mindmap
Python
What is it?
- Interpreted, high-level, general-purpose programming language
- A code which instructs the computer
Sequencing Instructions
- If there is a problem, decomposition must break it down into smaller, simpler steps
- The sequencing instructions, when in the right order, are called an algorithm
- Algorithms are the different steps to solving the problem
- Decomposition is the process of the problem being broken down into simpler steps and put in order
- The sequence is the order in which the computer follows the steps in order to solve the problem
Variables
- The name of a place/location which temporarily holds information
- age= "15"
- The variable is the age; its value is 15
- The value can be held in single ('15') quotes or double ("15") quotes
- age= "15"
- The name of a place/location which temporarily holds information
Elements
- Functions are built-in routines which do a specific job
- They appear in purple
- e.g. print() or input()
- They appear in purple
- Comments are text shown on the screen to let the user know what the function is
- They are displayed in green
- Functions are built-in routines which do a specific job
Strings
- The string is the characters which are printed, defined by the variable
- age="15" print(age)
- The variable represents the characters 1 and 5 which will be printed. Therefore 15 is the string of the variable
- Multiline Strings
- Multiline strings are used to program the printing of a paragraph or longer sequence of characters
- x=" " "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah" " " print(x)
- The multiline strings must use 3 sets of quotation marks (""" or ''')
- Slicing
- If you only want specific characters from a string, you can code it differently.
- x="Hello World!" print(x[3])
- This will only print the letter l because l is the third character.
- The first character is in position 0
- x="Hello World!" print(x[0:4])
- This will print Hello because the coding is to print characters in positions 0 to 4
- x="Hello World!" print(x[-3])
Informationen
- Beschreibung
- Mindmap am Python, erstellt von Guinea Winnie am 04/12/2019.
- Erstellt von
- Guinea Winnie
- Aufrufe
- 1
- Bewertung