From 56d88f312fead0a1025946b432e4268b55689b65 Mon Sep 17 00:00:00 2001 From: Habiba Sorour Date: Fri, 14 Aug 2026 23:16:55 +0300 Subject: [PATCH] added parson problem --- pretext/AtomicData/BooleanData.ptx | 48 +++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) 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