Does an If statement need to include an else in order to meet the requirement for a selection statement? I have students modeling some of the projects we have done using for loops that have if statement nested within but do not include an else statement.
My understanding is no it does not
1 Like
Nope, it just needs to control the flow - which can happen with an else or without it.
1 Like
It does for one part, maybe not another. PDF/PPR only needs selection (if statement), BUT there are several question that might ask about if/else statements. For example, to get credit for sample question 2(b) If it is not possible for two calls to your procedure to cause different code segments to execute, explain why this is the case for your procedure.. Your student would have to re-write part of their code. After reading last year, VERY FEW students got points trying to attempt this. Short answer, they will get credit for the PPR / PDF points, but will be a challenge under one of the 2(b) possible questions.
2 Likes