* Add first draft material for testing * added some first test stuff in julia * add asserti error * Rework intro slides * added package * Wrap up testing slides expect demo * Smooth demo part * Add statement on tests * Remove previous python exercise file --------- Co-authored-by: behinger (s-ccs 001) <benedikt.ehinger@vis.uni-stuttgart.de>
17 lines
314 B
Julia
17 lines
314 B
Julia
|
|
function find_max(x::AbstractVector)
|
|
@assert all(!isnan,x)
|
|
currentmax = x[1]
|
|
for a = eachindex(x)
|
|
if x[a] > currentmax
|
|
currentmax = x[a]
|
|
end
|
|
end
|
|
return currentmax
|
|
end
|
|
|
|
function find_mean(x::AbstractVector)
|
|
@assert all(!isnan,x)
|
|
return sum(x)./length(x)
|
|
end
|