Question: 4. For the following problems, analyze the problem in terms of input and out- put, and develop an algorithm to solve the problem. Write your

4. For the following problems, analyze the problem in terms of input and out- put, and develop an algorithm to solve the problem. Write your algorithm in pseudocode (a) Compute and display the period of an oscillating pendulum T (in seconds) as given by the equation L T = 21 g where L is the length of the pendulum (in metres), and g is the acceleration due to gravity (in metres per second squared). (b) The potential energy (PE) of an object due to its height above the Earth's surface is given by PE = mgh, where m is the mass of the object, g is the acceleration due to gravity, and h is the height above the surface. The kinetic energy (KE) of an object in motion is given by 1 : mv? where m is the mass of the object and v is the object's velocity. Compute and display the total energy of an object, given by the sum of its potential and kinetic energy
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
