### Instruction: How many seconds will a 500 meter long train take to cross a man walking with a speed of 3 km/hr in the direction of the moving train if the speed of the train is 63 km/hr?
Answer Choices: (A) 299 meters (B) 278 meters (C) 500 meters (D) 276 meters (E) 299 meters Please write a program to solve it.### Response: train_length = 500  # in meters
man_speed = 3  # in km/hr
train_speed = 63  # in km/hr

# convert man's speed from km/hr to m/s
man_speed = man_speed * (1000 / 3600)

# convert train's speed from km/hr to m/s
train_speed = train_speed * (1000 / 3600)

# calculate the relative speed between the train and the man
relative_speed = train_speed - man_speed

# calculate the time taken to cross the man
time = train_length / relative_speed

# convert time from seconds to meters
time = time * 1000
print(time)