The nonlinear dynamics of a simple pendulum is solved using lagrange equation,and the numerical simulation is carried out with Python software.The influence of damping factor and torque drive on the motion of simple pendulum is investigated. The simulation results present the variation of the pendulum angle and angular velocity with time,the evolution of the phase trajectory,and the chaotic phenomenon under strong driving force.