Using (str)my_age in concatenation

my_age = 20
half_my_age = my_age / 2
greeting = "Hello World! "
name = "My name is Seth and i am "
greeting_with_name = greeting + name + (str)my_age

for some reason i get a syntax error when using (str)my_age in this code. any idea why?


Try str(my_age) :wink:

1 Like

ohhhhhhh, thank you! :smiley:

1 Like

You’re welcome!
It’s always the little things…
Okay, not always, but frequently!
Happy Coding!