+10 XP
Strings and Booleans
Strings are text — wrapped in quotes. Booleans are True or False.
python
neuron_type = 'excitatory' # string
brain_region = "hippocampus" # also string — both ' and " work
is_refractory = True # boolean — neuron is in refractory period
is_spiking = False # boolean — not currently firingStrings hold text. Booleans hold yes/no values.
Booleans come from comparisons:`python
5 > 3 → True
10 == 10 → True (== means 'equal to')
7 != 7 → False (!= means 'not equal to')
V > -55 → True if voltage is above threshold`
= means 'assign'. == means 'compare'. Common mistake: if x = 5 is wrong. Use if x == 5.