Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
repository:football_players [2020/02/18 00:10]
porcaro1 [Answer Key]
repository:football_players [2021/02/18 19:08] (current)
porcaro1
Line 15: Line 15:
   * Cut/Copy Code.   * Cut/Copy Code.
   * Modify existing code   * Modify existing code
 +    * [[https://​www.glowscript.org/#/​user/​kstedman/​folder/​Public/​program/​CollidingCars|Colliding Crates]]
  
 ---- ----
 ====Activity==== ====Activity====
 ===Handout=== ===Handout===
 +{{ :​repository:​football_players_2.png?​nolink&​600|}}
 **Inelastic Collisions** \\ **Inelastic Collisions** \\
-{{ :​repository:​football_players.png?​nolink&​600|}}+
 In this activity, you will be asked to complete several tasks involving what you have learned about conservation of momentum and the interaction between masses when they collide and applying this knowledge to actual computer program code.  ​ In this activity, you will be asked to complete several tasks involving what you have learned about conservation of momentum and the interaction between masses when they collide and applying this knowledge to actual computer program code.  ​
  
Line 30: Line 32:
   - What is the final velocity of Biff and Buff while still in mid-air?   - What is the final velocity of Biff and Buff while still in mid-air?
   - Whose team wins the game: Biff's or Buff'​s?​   - Whose team wins the game: Biff's or Buff'​s?​
-  - Now modify your [[https://​www.glowscript.org/#/​user/​kstedman/​folder/​Public/​program/​CollidingCars|Colliding Crates]] program to fit this scenario+  - Now modify your [[colliding_crates|Colliding Crates]] program to fit this scenario
 ===Code=== ===Code===
 +[[https://​www.glowscript.org/#/​user/​porcaro1/​folder/​RepositoryPrograms/​program/​FootballPlayers-Incomplete | Link]]
 <code Python [enable_line_numbers="​true"​]>​ <code Python [enable_line_numbers="​true"​]>​
 GlowScript 2.7 VPython GlowScript 2.7 VPython
Line 41: Line 44:
 #Setting the time interval #Setting the time interval
 t=0                                                                             #​I'​ve set the initial time to zero. t=0                                                                             #​I'​ve set the initial time to zero.
-tf=0.940 ​                                                                           #I've set the final time to 0, which gives the crate enough time to slide across the floor+tf=0.940 ​                                                                       #I've set the final time to 0, which gives the crate enough time to slide across the floor
 dt=0.01 ​                                                                        #I want my time interval set at 1/100th of a time unit dt=0.01 ​                                                                        #I want my time interval set at 1/100th of a time unit
  
Line 59: Line 62:
    
 #This creates the graph of the kinetic energy of the crate #This creates the graph of the kinetic energy of the crate
-#f1 = gcurve(color=color.blue) ​                                                  ​#Setting up a graph to show the kinetic energy of the crate as a function of time +#f1 = gcurve(color=color.blue) ​                                                 #Setting up a graph to show the kinetic energy of the crate as a function of time 
-#for t in arange(0, 0.94, 0.01): ​                                                ​# Time goes from 0 to 0.94 in 0.01 time intervals+#for t in arange(0, 0.94, 0.01): ​                                               # Time goes from 0 to 0.94 in 0.01 time intervals
 #    f1.plot(pos=(t,​cratev.mag**2)) #    f1.plot(pos=(t,​cratev.mag**2))
 </​code>​ </​code>​
Line 66: Line 69:
 ====Answer Key==== ====Answer Key====
 ===Handout=== ===Handout===
 +{{ :​repository:​football_players_1.png?​nolink&​600|}}
   -Using the equation for momentum $\vec{p} = m\vec{v}$, we can plug in the known information to find Buff and Biff's respective momenta   -Using the equation for momentum $\vec{p} = m\vec{v}$, we can plug in the known information to find Buff and Biff's respective momenta
     -$\vec{p}_{Buff} = (100  \text{kg})(-8 ​ \text{m/s}) =-800  \text{kg·m/​s}$ ​     -$\vec{p}_{Buff} = (100  \text{kg})(-8 ​ \text{m/s}) =-800  \text{kg·m/​s}$ ​
Line 77: Line 81:
   -See below   -See below
 ===Code=== ===Code===
-[[https://​www.glowscript.org/#/​user/​kstedman/folder/Public/program/92/​edit ​| Link to Interactive Code]]+[[https://​www.glowscript.org/#/​user/​porcaro1/folder/RepositoryPrograms/program/FootballPlayers-Solution ​| Link]]
 <code Python [enable_line_numbers="​true",​ highlight_lines_extra="​6,​7,​8,​17,​20,​21,​22,​24,​25,​30,​32,​33,​34,​35,​36,​37"​]>​ <code Python [enable_line_numbers="​true",​ highlight_lines_extra="​6,​7,​8,​17,​20,​21,​22,​24,​25,​30,​32,​33,​34,​35,​36,​37"​]>​
 GlowScript 2.7 VPython GlowScript 2.7 VPython
Line 83: Line 87:
 #Creating the objects #Creating the objects
 floor = box(pos=vector(0,​-30,​0),​ size=vector(160,​4,​12),​ color=color.white) ​     #I've created the floor that the crate will slide across floor = box(pos=vector(0,​-30,​0),​ size=vector(160,​4,​12),​ color=color.white) ​     #I've created the floor that the crate will slide across
-crate1 = box(pos=vector(-40,​-20,​0),​ size=vector(20,​20,​5),​ color=color.red) ​          ​#I've created the crate, along with its dimensions and initial position resting on the floor+crate1 = box(pos=vector(-40,​-20,​0),​ size=vector(20,​20,​5),​ color=color.red) ​     #I've created the crate, along with its dimensions and initial position resting on the floor
 crate2 = box(pos=vector(40,​-20,​0),​ size=vector(20,​20,​5),​ color=color.blue) crate2 = box(pos=vector(40,​-20,​0),​ size=vector(20,​20,​5),​ color=color.blue)
 crate1m = 80 crate1m = 80
Line 120: Line 124:
 ---- ----
  
-====See Also==== +
-[[colliding_crates | Colliding Crates]]+
  • repository/football_players.1581984653.txt.gz
  • Last modified: 2020/02/18 00:10
  • by porcaro1