I have 3 arrays of size 5, one containing strings of names, another that correlates with their age, and another that correlates with their salary.
This is my first time using Python so I'm used to Java syntax and I'm not sure if I am approaching this right.
I have the following 2 lines:
for i in range(5):
name = raw_input("Enter a person's name: ")
nameArray.append(str(name))
age = raw_input("What is their age: ")
ageArray.append(int(age))
salary = raw_input("How much do they make: ")
salaryArray.append(int(salary))
for j in range(5):
print(nameArray + ' is ' + ageArray + ' years old and makes $' + salary)
index,nameArray[j]and so on... and you are using python2 or python3. I have a doubt aboutraw_input()method.array.arrayornumpy.arraytypes, not lists. While you certainly see sloppy use of the term, it is best to be precise. Python lists are very different than Java arrays, they are more likeArrayList<Object>in Java.