Random exercises in Swift