Question: Given the contents of the file as follow:

```
Company1 400
Company2 500
Company3 600
Company2 150
Company1 350

```

Write a script command to find the total cost incurred by Company1.

Answer: 
[Floating point numbers are not precise.](https://stackoverflow.com/questions/588004/is-floating-point-math-broken) The more you handle them, the more error they can accumulate. To have numbers you want, the best way is to keep things integral for as long as possible:

```
def number():
    b = 1
    while True:
        yield b / 10.0
        b += 1

```
You can pass the number as an argument:

```
def number(start=0.1,num=0.1):
    b = start
    while True:
        yield round(b,1)
        b += num

b = number(0,0.2)

```

It yields:

```
0
0.2
0.4
0.6
0.8
1.0
1.2
1.4
1.6
1.8

```