Table of Contents
In the first session we have explored some basic issues about a DNA sequence. The specific DNA sequence 'atcgat' was one of our data. For computer scientists this is also a value. During the program execution values are represented in the memory of the computer. In order to interpret these representations correctly values have a type.
![]() | Type |
|
Types are sets of data or values sharing some specific properties and their associated operations. | |
We have modeled the DNA sequence, out of habit, as a string. [1] Strings are one of the basic types that Python can handle. In the gc calculation we have seen two other ones: integers and floats. If you are not sure what sort of data you are working with, you can ask Python about it.
>>> type('atcgat')
<type 'str'>
>>> type(1)
<type 'int'>
>>> type('1')
<type 'str'>