-1
I wonder if someone could help me in this code in order to calculate neighboring numbers (numbers in common) in two arrays, but does not return output.
i = 0
j = 0
k = 0
input1 = input()
input2 = input()
input1.split(", ")
input2.split(", ")
while i < len(input1):
while j < len(input2):
if input1[i] == input2[j]:
result = input1[i]
print(result)
j = j + 1
i = i + 1
What would be "neighboring numbers"? And what will be the program entries? What should be the output?
– Woss
Just remember that when working with numbers that came from an input, you should convert them to float or int, for example float(input1), because you’re getting a string, also check that if
– FourZeroFive
Carlos, the common numbers of two arrays.
– nbbbvfd