Hi there,

Trying to learn Python…and struck an early problem…

What is wrong with this code?

# This program adds three numbers

num1 = 2

num2 = 2

num3 = 5

# Add two numbers

sum = num1 + num2 + num3

# Display the sum

print(‘The sum of {0} and {1} and {3} is {4}’.format(num1, num2, num3,sum))

Error message:

IndexError: Replacement index 4 out of range for positional args tuple

Now I simply tried to use logic to change this example I found online…and added a thrid number…

what am I missing? Thanks!

```
# This program adds two numbers
num1 = 1.5
num2 = 6.3
# Add two numbers
sum = num1 + num2
# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
```