9. Helpful Built-In Tools
Learn Helpful Built-In Tools through beginner-friendly explanations, working GOCO examples, and their expected output.
9.1 Math and Strings Tools
GOCO comes with special built-in tools. You type 'Import' to use them. 'math' does hard calculations. 'strings' can change text easily.
goco
Import math.Import strings.// Using math toolsDisplaynl(math.Sqrt(16)).Displaynl(math.Max(5, 10)).// Using string toolsDisplaynl(strings.Upper("apple")).Displaynl(strings.Length("apple")).
9.2 Array Tools
The 'arrays' library helps you fix and organize your arrays quickly.
goco
Import arrays.Number[] scores = [10, 5, 20].arrays.Sort(scores).arrays.Push(scores, 30).Displaynl(arrays.Sum(scores)).