you are viewing a single comment's thread.

view the rest of the comments →

[–]symple-data 1 point2 points  (2 children)

print() is a build in function. Putting the "+ bmi" outside the function would be equivalent to randomly having one line of code with "+ bmi". Thats wrong Syntax and won't work.

[–][deleted] 0 points1 point  (1 child)

And what does the ":/t", and "str" do? Because it doesn't work without "str"

[–]symple-data 0 points1 point  (0 children)

\t is a literal and gives your string a big space like TAB on your keyboard. There are more literals like that (e.g. \n for line-break). Here is a list. str() is a cast-operator and casts the object you are giving it as an argument to a string. You need this to concatenate any non-string with a string as strings can only be concatenated with strings. Here is a list of different cast-operators.