Name the part after if
What is the expression score >= 50 called in this code?
Start activityTopics / Conditionals
Decisions: Boolean conditions, branches, and boundary values.
AI suggestions often look locally tidy while encoding the wrong boundary (for example > instead of >=). Conditionals are where that error hides.
What is the expression score >= 50 called in this code?
Start activityMatch each term to the definition that fits it. The code is there so you can see what each term refers to; …
Start activityWhat is printed?
Start activityThe pricing rule has changed: people aged 65 and over now get the senior discount (previously only people over 65 did). Modify …
Start activityThe intended rule is: a score of 50 or more is a pass. Identify the bug.
Start activityAn AI generated this grading function. It gives the right answer, but it keeps re-testing conditions it already knows. Refactor it so …
Start activityRequirement: a year is a leap year if it is divisible by 4, except century years (divisible by 100), which are leap …
Start activity