python

Making Complex Trinomials

Tired of making new complex trinomials for quizzes and tests on factoring polynomials? If you have python installed, you can use this script for making quiz questions. from random import randint import math ############################################################ # complex will take the form ax^2 + bx + c # binomial factors will be in the form (dx + e)(fx + g) #randomly choose d, e, f, g for questions in range(0, 20): a, b, c, d, e, f, g = 0, 0, 0, 0, 0, 0, 0 ## use while statement to avoid zeroes while (d == 0): d = randint(-6,6) while (f == 0): f = randint(-7,7) while (e == 0): e = randint(-6,6) while (g == 0): g = randint(-10,10) a = d\*f b = d\*g + e\*f c = e\*g print ("(" + str(d) + "x + " + str(e) + ")(" + str(f) + "x + " + str(g) + ")

Installing Python

Let’s suppose you’re interested in learning about Python, or want to install it on your computer for the first time. If you have a 64bit OS, I strongly suggest that you install the 32bit version. I’m certainly no expert in Python, but I think this is the best way to avoid possible headaches in the future. Like the headache I’ve been dealing with… As mentioned before, I’ve been fooling around with some basic computational modeling using Python, VPython and Scratch.

Computational Modeling with Scratch

I’ve been following the thoughts of John Burke and what he’s been writing and doing with introducing computational modeling to HS physics. I think there are some real opportunities with using modeling in this way. The greatest thing I see with it is that the students end up doing science and engineering. They’re not answering pseudo contextual questions from a textbook or worksheet, but actually applying their knowledge in a way that real scientists and engineers would.