Kodewick
开始学 →
入门←→0 / 70

过山车身高

#011入门条件约 2 分钟

过山车要求身高至少 120 厘米。写 CanRide(height):身高(厘米)够了返回 true,不够返回 false。正好 120 也能坐。

示例
CanRide(130)→True
CanRide(119)→False
函数func CanRide(height int) bool
main.go
package main

func CanRide(height int) bool {
	// 在这里写:身高够 120,就返回 true
	return false
}
Ctrl + Enter 也能运行
结果

写好了先点「运行」试试示例,没问题再点「提交」。