介绍
在这个修订后的挑战中,你将使用一个现有的 Go 包 (challengeproject/mathutil
),该包实现了一个 Square()
函数。你的目标是创建一个 main.go
文件,其中包含导入和调用 Square()
的基本占位符。在替换掉占位符 TODO
后,运行程序应该会打印出给定整数的平方结果(例如,如果整数是 5,则打印 25)。
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
go(("Golang")) -.-> go/DataTypesandStructuresGroup(["Data Types and Structures"])
go(("Golang")) -.-> go/FunctionsandControlFlowGroup(["Functions and Control Flow"])
go/DataTypesandStructuresGroup -.-> go/structs("Structs")
go/FunctionsandControlFlowGroup -.-> go/functions("Functions")
subgraph Lab Skills
go/structs -.-> lab-435676{{"构建数学工具包"}}
go/functions -.-> lab-435676{{"构建数学工具包"}}
end