other computing Flashcards
Open
file = open(“quick.txt”, “_”)
Read
file = open(“quick.txt”, “r”)
quicktext = file.read()
Close
Write (overwrite)
file = open(“quick.txt”, “w”)
Append (add to)
file = open(“quick.txt”, “r”)
Turtle commands
All on the PLS.
Import turtle with import turtle
List
a type of data structure that can be used to manipulate the elements they contain.
Array
a kind of data structure that can hold a number of items grouped together. it contains a number of items grouped together, and named using a single identifier, however can only hold the same data type.
Procedures
Carries out an action but doesn’t return a value
Functions
Carries out an action and returns a value
Data structure
store data in an organised and accessible way. They can be static or dynamic.
Dynamic data structure
more flexible. The memory capacity is not fixed.
Static data structure
reserves memory locations for a set amount of data. Their size cannot change.
String format
print(”Alice has {} cupcakes.”.format(5))
Record
Stores a collection of attributes/fields for a single entity.
Static data structure