Errata in chapter 8.
Closed this issue · 2 comments
goropikari commented
- For the program in "Looping and Counting" section,
global
is necessary forcount
infor
loop.
julia> word = "banana"
"banana"
julia> count = 0
0
julia> for letter in word
if letter == 'a'
count = count + 1
end
end
ERROR: UndefVarError: count not defined
Stacktrace:
[1] top-level scope at ./REPL[20]:3 [inlined]
[2] top-level scope at ./none:0
julia> println(count)
0
julia> word = "banana"
"banana"
julia> count = 0
0
julia> for letter in word
if letter == 'a'
global count = count + 1
end
end
julia> println(count)
3
- Exercise 8-4.
islower
is deprecated. It should beislowercase
.
BenLauwens commented
Thanks!
Source and html doc is updated.
BenLauwens commented
I would like to mention you in my book as a contributor.
If you are ok with it, can you give me your full name.
Thanks
Ben