samedi 22 juin 2019

Generate random values for different students in an assignment

I'm wondering if there is any website that a teacher can put in the HTML codes and then give students access to do the assignment, in which each value is different for each value? Say for one student, asset is $5 million, while for another, it's $10 million. Most variables are randomly generated, while some are built upon formulas of the other variables.

Please find my HTML code below, along with the variable definition.

This is for my mother - she's teaching accounting, but the school does not allow students to buy online programs like Wiley or Pearson.

<div class="narrative">

<p>Little Books Inc. recently reported $<alg:value>ni</alg:value> million of net income.  Its EBIT was $<alg:value>ebit</alg:value> million, and its tax rate was <alg:value>t</alg:value>%.  What was its interest expense?  [Hint: Write out the headings for an income statement and then fill in the known values.  Then divide $<alg:value>ni</alg:value> million net income by (1 - T) = <alg:value>t1</alg:value> to find the pretax income.  The difference between EBIT and taxable income must be the interest expense.  Use this same procedure to complete similar Problems.] Write out your answer completely. For example, 25 million should be entered as 25,000,000. Round your answer to the nearest dollar, if necessary.</p>


</div>

My variables:

var ni=integer(1,15);
var k=real(1.4,2.5,0.1);
var ebit=k*ni;
var t=integer(30,40,5);
var t1=1-0.01*t;
var ans=round((ebit-ni/t1)*100000000)/100;
lim ans>0;
lim ans = (ebit-ni/t1)*1000000;
# algorithm for feedback;
var NI1=ni*10^6;
var EBIT1=ebit*10^6;
var EBT=NI1/t1;
var Interest=EBIT1 - EBT;
var Tax=EBT*t/100;
var NI2=EBT- Tax;




Aucun commentaire:

Enregistrer un commentaire