miscon:programming.types.integer-division-gives-fraction · draft · trust low · v0.1.1 · kind overgeneralization

Dividing two integers gives a fraction

Dividing one whole number by another gives the exact mathematical result with a fractional part, whatever the types involved.

Stable URI
https://open-misconceptions.github.io/miscon-data/m/programming.types.integer-division-gives-fraction
UUID
f884573f-e177-4865-9cbb-e334397e406a
Domain
programming.types
Level band
secondary, undergraduate
Locale
en
About
https://open-misconceptions.github.io/miscon-data/c/programming.types.integer-division (Miscon)

Evidence patterns

Pattern 0: predict the result of integer division in a language that truncates

predicts the exact quotient

Itemint x = 7 / 2; System.out.println(x);
Expected3
Response3.5

Pattern 1: compute an average of integers

divides an int sum by an int count and expects a decimal average

Itemint total = 7, n = 2; double avg = total / n;
Expected3.0 (integer division happens first)
Response3.5

Discriminators

vs a slip. Consistent across items; the learner is surprised by 3 and cannot explain it. A slip is forgetting a cast once while knowing the rule.

Relations

conflicts_with
Dividing two integers gives an integer result (external)
resolved_by
Dividing two integers gives an integer result (external)

Provenance

Origin: llm-drafted

  1. Qian, Y., & Lehman, J. (2017). Students' misconceptions and other difficulties in introductory programming: A literature review. ACM Transactions on Computing Education, 18(1), Article 1. doi:10.1145/3077618
    Integer division and type-related misconceptions in the review.
  2. Sorva, J. (2012). Visual Program Simulation in Introductory Programming Education (Doctoral dissertation, Aalto University). Appendix A catalogues introductory programming misconceptions from the literature. link

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

Cite

miscon:programming.types.integer-division-gives-fraction
https://open-misconceptions.github.io/miscon-data/m/programming.types.integer-division-gives-fraction