need help for input-command | input from user needs to be multipleline | vectoraddition
hey guys. tried some vectoraddition, sadly the input is made all at once. seems i missed something for the input command. i want the code to read every component each, or at least per vector anybody knows stuff and can help? code -> #vectoraddition print('plz give me vector a!') a_1=input('first component of vector a:') a_2=input('second component:') a_3=input('third component:') a=[float(a_1),float(a_2),float(a_3)] print(a) print('plz give me vector b!') b_1=input('first component of vector b:') b_2=input('second component:') b_3=input('third component:') b=[float(b_1),float(b_2),float(b_3)] print(b) c=[0,0,0] i=0 while i<3: c[i]=a[i]+b[i] i+=1 print(c) <- code and perhaps as a second question, is it possible to read the vectorcomponents iteratively: e.g. n=0 a=[0,0,0] while n<2: a[n]=input('n'+'component:') n+=1 My example doesnt work as you guys probably see. :/