Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello guys, my question is how to relate these two lists, for example: if the DISTANCE of force 1 is 3 and this is in index 4 of the first list, the FORCE of force 1 should be found in index 4 of the second list

What I have tried:

Python
from math import *

a=0
l=int(input(' beam length = ') )
x=int(input(' leading end value = ') )
y=int(input(' endpoint value = ') )
f1=int(input(' force 1 = '))
x1=int(input(' distance 1 = '))
f2=int(input(' force 2 = '))
x2=int(input(' distance 2 = '))
p=int(input(' points = ') )





distância = [ ]
distância.append(0)
for n in range(0,p):
	a +=(l/p)
	distância.append(a)

print(' distance = ',distância)

lst = [0] * p
lst[0]=x
lst[-1]=y
print(' forces acting on points = ',lst)
Posted
Updated 24-Jul-22 7:30am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900