A programmer wishes to write code that accepts a string `word` as input and computes a list `V` that stores the frequencies of occurrence of the vowels `'aeiou'` in the string. Each element in `V` corresponds to the frequency of one vowel in the string:
- `V[0]`: frequency of `'a'`
- `V[1]`: frequency of `'e'`
- `V[2]`: frequency of `'i'`
- `V[3]`: frequency of `'o'`
- `V[4]`: frequency of `'u'`
Study the two codes given below and determine their correctness for this task. A code is correct only if it is error-free and produces the correct output for any given input. Assume that the input to the code will have only lower-case letters.
Code-1
```
word = input()
V = []
for i in range(5):
V[i] = 0
vowels = 'aeiou'
for char in word:
if char in vowels:
index = vowels.index(char)
V[index] += 1
```
Code-2
```
word = input()
V = []
for i in range(5):
V.append(0)
vowels = 'aeiou'
for char in word:
if char in vowels:
index = vowels.index(char)
V[index] += 1
```