Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions source/calculus/exercises/outcomes/AD/AD3/generator.sage
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@ class Generator(BaseGenerator):
heightperson=round(uniform(4.8,6.5),1)
personspeed=round(uniform(1,3),1)

shadowdirection="up"
persondirection=choice(["light", "wall"])
if persondirection=="wall":
shadowdirection="down"
path, shadowdirection = choice([("from a light on the ground towards a wall", "down"),
("away from a wall towards a light on the ground", "up") ])

dHdtround=round(lighttowall*personspeed*heightperson/disttolight^2,2)
# numshadow=lighttowall*personspeed
# denomshadow=disttolight^2

name = choice(["Cory","Mr. Feeny","Amy","Eric","Shawn","Morgan","Topanga"])
if choice([True, False, False]):
Expand All @@ -78,11 +74,9 @@ class Generator(BaseGenerator):
"disttowall": disttowall,
"heightperson": heightperson,
"personspeed": personspeed,
"persondirection": persondirection,
"path": path,
"shadowdirection": shadowdirection,
"dHdtround": dHdtround,
# "numshadow": numshadow,
# "denomshadow": denomshadow,
"name": name,
"pronoun1": pronoun1,
"pronoun2": pronoun2
Expand Down
2 changes: 1 addition & 1 deletion source/calculus/exercises/outcomes/AD/AD3/template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<content>
<p>
{{name}} is <m>{{heightperson}}</m> ft tall, and is walking in a straight line from a light on the ground toward the {{persondirection}} at a rate of <m>{{personspeed}}</m> ft/sec. At the moment {{pronoun1}} <m>{{disttolight}}</m> ft away from the light (and <m>{{disttowall}}</m> ft from the wall), how fast is the height of {{pronoun2}} shadow changing? In which direction is the shadow changing?
{{name}} is <m>{{heightperson}}</m> ft tall, and is walking in a straight line {{path}} at a rate of <m>{{personspeed}}</m> ft/sec. At the moment {{pronoun1}} <m>{{disttolight}}</m> ft away from the light (and <m>{{disttowall}}</m> ft from the wall), how fast is the height of {{pronoun2}} shadow changing? In which direction is the shadow changing?
</p>
</content>
<outtro>
Expand Down
Loading