Advertisement
Guest User

Error when generating PDF

a guest
Dec 11th, 2015
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. DOCUMENT();
  2.  
  3. loadMacros(
  4. "PGstandard.pl",
  5. "MathObjects.pl",
  6. "parserRadioButtons.pl",
  7. "contextCurrency.pl"
  8. );
  9.  
  10. TEXT(beginproblem());
  11.  
  12. $showPartialCorrectAnswers = 0;
  13.  
  14. Context("Currency");
  15.  
  16. $A = Currency(random(7.05, 20.91, 0.35));
  17.  
  18. $product1 = ($A * 8.875) /100;
  19. $product2 = ($A * 8.875 + 10.15) /100;
  20. $product3 = ($A * 8.875 + 20.23) / 100;
  21. $product4 = ($A * 8.875 - 10.02) / 100;
  22.  
  23. # labels=>"ABC" is required in order to solve the student answer display problems
  24. $multchoice = RadioButtons(
  25. ["$product1",
  26. "$product2",
  27. "$product3",
  28. "$product4"],
  29. "$product1",labels=>"ABC");
  30.  
  31.  
  32. ## Use $DOLLAR for "$" and $PERCENT for "%"
  33. Context()->texStrings;
  34. BEGIN_TEXT
  35.  
  36. You order a Veggie Burrito from Chipotle for \($A\); if New York State charges 8.875$PERCENT, how much do you pay in sales tax for your burrito?
  37.  
  38. $PAR \{$multchoice->buttons()\}
  39.  
  40. END_TEXT
  41. Context()->normalStrings;
  42.  
  43. ANS($multchoice->cmp());
  44.  
  45. ENDDOCUMENT();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement