Mapa mental
Paper 2 revision #3
Contenido del mapa
Paper 2 revision #3
Usually refers to if statements.
String manipulation
- Write a code that takes the first 3 letters of someones first name and the first three letters of their last name.
- a = input("Enter your first name") b = input("Enter your surname") c = (a[:3]) d = (b[:3]) print(c+d)
- Write a code that takes the first 3 letters of someones first name and the first three letters of their last name.
Usually used when there are multiple types of answer to a question.
If, elif, else.
Writing/reading to a file.
- "r" is reading from a file,
- "w" means writing to a file.
- "a" means adding to the end of a textfile.
- open("data.txt" , "w")
- This means creating a file called data.txt . This allows us to create a file that does not exist.
- We can also use "x" to create a file. This will also return an error if the file already exists.
Información
- Descripción
- Mapa Mental sobre Paper 2 revision #3, creado por Harriet Leplar el 20/05/2019.
- Creado por
- Harriet Leplar
- Visitas
- 2
- Valoración