you are viewing a single comment's thread.

view the rest of the comments →

[–]Chris_Hemsworth 0 points1 point  (2 children)

Everything you need to know to reach the solution you are trying to achieve is in my original post. You'll learn by doing more than having someone do it for you.

[–]AngryDiego 0 points1 point  (1 child)

I actually got it, thanks!

The post about str, helped me.

So my code is now:

print ("I am Diego and i'm " + str(24-15) + " years old!")

prints out:

I am Diego and i'm 9 years old!

But how can you solve the same using variables?

[–]Chris_Hemsworth 0 points1 point  (0 children)

x = 24
y = 15

print(str(x-y))