8 kyu

Grasshopper - If/else syntax debug

20,257 of 41,335danleavitt0

Description:

If/else syntax debug

While making a game, your partner, Greg, decided to create a function to check if the user is still alive called checkAlive/CheckAlive/check_alive. Unfortunately, Greg made some errors while creating the function.

checkAlive/CheckAlive/check_alive should return true if the player's health is greater than 0 or false if it is 0 or below.

The function receives one parameter health which will always be a whole number between -10 and 10.

Debugging

Stats:

CreatedApr 9, 2016
PublishedApr 9, 2016
Warriors Trained46352
Total Skips833
Total Code Submissions73863
Total Times Completed41335
JavaScript Completions20257
Python Completions15472
PHP Completions2076
C# Completions2263
Ruby Completions817
C Completions1195
Rust Completions404
TypeScript Completions423
Scala Completions44
Haskell Completions75
Java Completions205
Total Stars175
% of votes with a positive feedback rating91% of 4524
Total "Very Satisfied" Votes3797
Total "Somewhat Satisfied" Votes619
Total "Not Satisfied" Votes108
Ad
Contributors
  • danleavitt0 Avatar
  • dougbacelar Avatar
  • 10XL Avatar
  • donaldsebleung Avatar
  • Chrono79 Avatar
  • asedov Avatar
  • Chet Manley Avatar
  • Voile Avatar
  • Souzooka Avatar
  • FArekkusu Avatar
  • booniepepper Avatar
  • Arothe Avatar
  • hobovsky Avatar
  • Meisterschueler Avatar
  • blibblob Avatar
  • username0 Avatar
  • ejini战神 Avatar
  • rge123 Avatar
  • Kacarott Avatar
  • KayleighWasTaken Avatar
  • tomatosonic Avatar
Ad