diff --git a/pretext/AtomicData/BooleanData.ptx b/pretext/AtomicData/BooleanData.ptx index 1245164..b4ac624 100644 --- a/pretext/AtomicData/BooleanData.ptx +++ b/pretext/AtomicData/BooleanData.ptx @@ -298,7 +298,53 @@ int main(){ - + + + +

+ Rearrange the blocks to create a C++ function checkCondition that takes two integers, score and lives. It should return a bool value indicating if score is greater than or equal to 100 AND lives is strictly greater than 0. +

+
+ + + + bool checkCondition(int score, int lives) { + + + Boolean checkCondition(int score, int lives) { + + + + + + bool isValid = (score >= 100) && (lives > 0); + + + bool isValid = (score >= 100) and (lives > 0); + + + + + + if (isValid) { + return true; + } + + + if (isValid) { + return True; + } + + + + + return false; + } + + +
+ + \ No newline at end of file