+1(316)4441378

+44-141-628-6690

Archive for the ‘Programming- Python’ Category

Physics programming on electrical fields

Create a program in VPython that will place eight 1-nC charges at the following coordinates (in meters): <0,0,0>, <0,0,1>, <0,1,0>, <0,1,1>, <1,0,0>, <1,0,1>, <1,1,0>, and <1,1,1>. It will then ask for the x, y, and z coordinates of a point in space. The program should then draw arrows (of the same length) from each charge toward <x,y,z>. Finally, the program should output the total electric field at <x,y,z>.