Data Types Flashcards Preview

1 Computing AS Level (JoshH) > Data Types > Flashcards

Flashcards in Data Types Deck (2)
Loading flashcards...

Name 6 Data Types

Integer = 6
Real = 6.5
Boolean = True
Character = “C”
String = “Hello World”
Array = [1,2,3]


What are the differences between arrays and lists?

Arrays and lists are both used in Python to store data, but they don't serve exactly the same purposes.
They both can be used to store any data type (real numbers, strings, etc), and they both can be indexed and iterated through
The main difference between a list and an array is the functions that you can perform to them.
For example, you can divide an array by 3, and each number in the array will be divided by 3 and the result will be printed if you request it.
If you try to divide a list by 3, Python will tell you that it can't be done, and an error will be thrown.