just got into python, any advice why these simple lines sends me an error?
# ---------------- WEIGHT CONVERTER ----------------#
_userWeight = input("Weight [KG]: ")
_userLbs = int(_userWeight) * 2.2
print(int(_userWeight) + "[KG] = " + int(_userLbs) + "[lbs]")
>Solution :
_userWeight = input("Weight [KG]: ")
_userLbs = int(_userWeight) * 2.2
print(int(_userWeight) , "[KG] = " , int(_userLbs) , "[lbs]")
Remove the ‘+’ and use a ‘,’
Output:
Weight [KG]: 50
50 [KG] = 110 [lbs]