Kodewick
Commencer à apprendre →
Débutant←→0 / 70

Taille pour le grand huit

#011Débutantif height >= 1202 min

Pour monter dans le grand huit, il faut mesurer au moins 120 cm. Écris CanRide(height) : renvoie true si la taille (en cm) suffit, false sinon. 120 pile, ça passe.

Exemples
CanRide(130)→True
CanRide(119)→False
La fonctionfunc CanRide(height int) bool
main.go
package main

func CanRide(height int) bool {
	// ton code ici: assez grand (120 ou plus)? renvoie true
	return false
}
Ctrl + Entrée lance aussi le code
Résultat

Exécuter teste les exemples. Quand ils sont bons, appuie sur Envoyer.