miscon:programming.control.if-is-loop · draft · trust low · v0.1.1 · kind misapplied-analogy
An if statement repeats while its condition holds
The body of an if statement keeps running for as long as the condition is true, like a while loop.
- Stable URI
- https://open-misconceptions.github.io/miscon-data/m/programming.control.if-is-loop
- UUID
aa78ad26-c8b4-4d72-8e2f-84a48c0efed1- Domain
programming.control- Level band
- secondary, undergraduate
- Locale
- en
- About
- https://open-misconceptions.github.io/miscon-data/c/programming.control.conditional (Miscon)
Evidence patterns
Pattern 0: trace an if statement whose body keeps its condition true
predicts repeated execution of the body
x = 0
if x < 3:
x = x + 1
print(x)13Discriminators
vs a slip. Consistent across items; the learner describes the if as 'checking until'. A slip is a single wrong count.
vs programming.control.while-checked-continuously. That belief is about while loops exiting mid-body; this one is about if statements looping.
vs programming.control.conditional-is-sequence. Sequence believers run both branches once; if-loopers run one branch many times.
Relations
conflicts_with- An if statement evaluates its condition once and runs at most one branch (external)
resolved_by- An if statement evaluates its condition once and runs at most one branch (external)
A loop checks its condition only at defined points and repeats its whole body (external) confusable_withprogramming.control.conditional-is-sequenceprogramming.control.while-checked-continuously
Alignments
- progmiscon Java/IfIsLoop (close-match)
Provenance
Origin: llm-drafted
- Chiodini, L., Moreno Santos, I., Gallidabino, A., Tafliovich, A., Santos, A. L., & Hauswirth, M. (2021). A curated inventory of programming language misconceptions. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE '21), 380-386. doi:10.1145/3430665.3456343
Inventory consulted for the misconception name and scope only; progmiscon publishes no licence for its text, so Open Misconceptions' statements and examples are written independently. - Sorva, J. (2012). Visual Program Simulation in Introductory Programming Education (Doctoral dissertation, Aalto University). Appendix A catalogues introductory programming misconceptions from the literature. link
- Sirkiä, T., & Sorva, J. (2012). Exploring programming misconceptions: An analysis of student mistakes in visual program simulation exercises. In Proceedings of the 12th Koli Calling International Conference on Computing Education Research, 19-28. doi:10.1145/2401796.2401799
Drafted from the cited literature for the Open Misconceptions seed pack; statement, examples and discriminators are original text. Awaiting maintainer review.
Review status
Status draft, trust low (computed from the reviews below against the reviewer registry).
No reviews yet.
Formats
- Raw JSON
- CASE 1.1 package (CFItem
aa78ad26-c8b4-4d72-8e2f-84a48c0efed1) - Source on GitHub
Cite
miscon:programming.control.if-is-loop
https://open-misconceptions.github.io/miscon-data/m/programming.control.if-is-loop