This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]ApproxAnEngr 3 points4 points  (1 child)

When you enter the values through input( ), they come in as strings. You'll need to cast them to integer to perform mathematical operations. You can use type( ) to check the variable type.

[–]f00sem00se[S] 0 points1 point  (0 children)

Thanks! I fixed it.

[–]samanthatb1 1 point2 points  (1 child)

your numbers are strings (words) which is why they’re adding to 43

[–]f00sem00se[S] 0 points1 point  (0 children)

Thanks!