ROLL NO: 24k-0622
QUESTION 1:
speed_km_h = 90 time_sec = 0.50 print("First,convert speed to m/s")
speed_m_s = speed_km_h * (1000 / 3600) print( "1000/3600 = 5/18")
print("Now to calculate the actual speed:") print("v=90 * 5/18 = 25 m/s")
print("Then,Calculate distance") distance = speed_m_s * time_sec
print("0.50*25 = 12.5 m ")
print(" Therefore,Distance traveled:",distance,"meters")
QUESTION 7:
# Displacement between t=0 and t=4
x0 = position(0)
x4 = position(4)
displacement = x4 - x0
# Average velocity from t=2 to t=4
x2 = position(2)
average_velocity = (x4 - x2) / (4 - 2)
# Print results
print("find the positions at given times")
print("Positions at t = 1, 2, 3, 4:", positions)
print("Then to find the displacement between t=0 and t=4:")
print(" Displacement = x(4)-x(0):")
print("Displacement between t = 0 and t = 4:", displacement)
print("Next, to find the average velocity= (x(4)-x(2))/t(4)-t(2)")
print("Average velocity from t = 2 to t = 4:", average_velocity)
QUESTION 14:
import math
# Position function
def position(t):
return 16 * t * math.exp(-t)
# Velocity (derivative of position)
def velocity(t):
return 16 * (math.exp(-t) - t * math.exp(-t))
# Find t when velocity is zero (analytically t = 1)
t_stop = 1
# Position at t = 1
x_stop = position(t_stop)
# Print result
print("Fisrt, find the velocity and then find out the time/t when velocity is zero")
print("Position when the electron stops: {x_stop:.2f} meters")
QUESTION 5:
# Displacement between t=0 and t=4
x0 = position(0)
x4 = position(4)
displacement = x4 - x0
# Average velocity from t=2 to t=4
x2 = position(2)
average_velocity = (x4 - x2) / (4 - 2)
# Print results
print("find the positions at given times")
print("Positions at t = 1, 2, 3, 4:", positions)
print("Then to find the displacement between t=0 and t=4:")
print(" Displacement = x(4)-x(0):")
print("Displacement between t = 0 and t = 4:", displacement)
print("Next, to find the average velocity= (x(4)-x(2))/t(4)-t(2)")
print("Average velocity from t = 2 to t = 4:", average_velocity)
QUESTION 19:
# Initial and final velocities
v_initial = 18 # m/s
v_final = -30 # m/s
time_interval = 2.4 # seconds
# Average acceleration
average_acceleration = (v_final - v_initial) / time_interval
# Print the result
print("To find the average acceleration.use the following formula.")
print("(final -initial)/change in time",v_final,'-',v_initial,'/',time_interval)
print("Average acceleration:" ,average_acceleration," m/s^2")