A story problem about buying apples, for students who can work simple story problems. Apples are 45 cents a pound, or 35 cents a pound for 10 pounds and over; 8 apples weigh 7 3/4 pounds. It asks four questions in turn: the cost of the 8 apples, how many pounds to add to reach 10 pounds, about how many more apples that takes, and the cost of 10 1/2 pounds. A wrong answer is refused and the question asked again.
Answers in dollars are typed as decimals (3.49); a whole number and a fraction are typed as a sum, such as 2+1/4.
Published in The Plotter August 1993 (Apple Problem).
Source Code
1 PRINT "This is a story problem for students who can work simple story problems."
10 PRINT : PRINT "DICK is fond of home made apple sauce and uses some apples the size of soft balls to make apple sauce. They are called CRISPEN apples."
20 PRINT : PRINT "The Fir Point produce stand thatsells CRISPEN apples is only a few miles from his home."
30 PRINT : PRINT "A big bin holding these apples has a sign stappled to its side that says ""45 CENTS A POUND. 10 POUNDS AND OVER 35 CENTS A POUND""."
40 PRINT : PRINT "DICK picks out 8 apples and hands them to the clerk who weighs them and finds he has 7 3/4 pounds"
50 PRINT : PRINT "How much will the apples cost?": INPUT C
52 IF C<>3.49 THEN PRINT "Wrong, try again.": GO TO 50
55 IF C=3.49 THEN PRINT "Correct,$3.49 for 7 3/4 pounds.": GO TO 60
60 PRINT : PRINT "The clerk says that he can add more apples for a few cents more, if he has 10 or more pounds."
70 PRINT : PRINT "How many pounds must be added to 7 3/4 pounds to get them for $3.50 (a total of 10 pounds)? NOTE:a whole number plus a fraction must be like 3+5/8.": INPUT P
72: IF P<>2+1/4 THEN PRINT "Wrong, try again.": GO TO 70
75 IF P=2+1/4 THEN PRINT "Correct, 2 1/4 pounds"
80 PRINT : PRINT "If 8 apples weigh 7 3/4 pounds, about how many more apples must he get out of the bin to make at least 10 pounds?": INPUT A
82 IF a<>3 THEN PRINT "Wrong, try again": GO TO 80
85 IF A=3 THEN PRINT "Correct, 3 apples."
90 PRINT : PRINT "DICK picks out 3 more apples and finds that he has enough now to weigh 10 1/2 pounds."
100 PRINT : PRINT "How much will the apples cost DICK?": INPUT C
110 IF C<>3.68 THEN GO TO 100
120 IF C=3.68 THEN PRINT "Correct, $3.68 for 10 1/2 pounds of apples."Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


