## Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

### Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

# When I key in the last line, why do I get the error message that the first task of defining the age variable fails.

```age = int("21")
days = int( age * 52 * 7 )
decades = ( age / 10 )
```

Thanks

STAFF

I think our CC engine was having some problems when you tried this originally. You do have a syntax bug in your code, though. Your last line doesn't use the `format` method, as it should.

Also, why are you doing so much work? Why use `int("21")` instead of just `21`? Why `int(round(decades))` instead of just `round(decades)` since `round()` always returns an int anyway?

Hey Kenneth, Thanks for the reply.

I am confused about when I need to use int. Supposing I am adding two numerical values say 21 + 34 and this is going to assigned to variable number_1

should I write number_1 = int (21 + 34) ?

Thanks

Girri M Palaniyapan You only need to use `int()` when you want to make something that's not an int into an int. Like, turning the string `'100'` into the int `100`, you'd used `int('100')`. Doing `int(21 + 34)` doesn't make sense because `21` and `34` are already ints.

The same applies to `str()`, `list()`, `dict()`, etc.

Hi Girri

You are getting that error message as the code for the last question has some mistakes, unfortunately the error message isn't pointing you in the right direction.

As an example similar to what the last question is asking - if I had two variables, `day` and `time` that needed inserting into a string I would do it like this:

```date = 30
time = 10
summary = "It is the {}th September at {} o'clock".format(date, time)
```

Make sure you have the correct code for formatting the values you are inserting into the string, also make sure you are inserting the correct variables.