Julia intermedio
Anthony Markham
Quantitative Developer
mutable struct House
bedrooms::Int64
bathrooms::Int64
location::String
price::Float64
end
my_house = House(3, 2, "Sydney", 1500000)
mutable struct Person
age::Int64
height::Int64
location::String
function Person(age, height)
new(age, height, "London")
end
end
steve = Person(19, 180)
Person(19, 180, "London")
function arg_types(pos, ; key)
return pos, key
end
function vararg_names(names...)
return names
end
function return_x_times_y(x, y)
return x * y
end
Le funzioni sono flessibili e scriverle è essenziale.
Risolvere problemi pratici è fondamentale per imparare a programmare.
Julia intermedio