#Could someone explain this to me? I haven't learned the concept yet. Thanks!

14 messages · Page 1 of 1 (latest)

warm slate
heavy bearBOT
#

This post has been reserved for your question.

Hey @warm slate! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

void aspen
#

if x is 3 and y is 2, what is sum?

warm slate
#

5?

celest spire
#

x + y = z
if x = 3 and y = 2
(3) + (2) = z
z = 5

Therefore, the sum is 5.

south rock
#

I do not think that is the problem that the picture is implying…

#

Just think of the logical outcome or possible complication of the code if different values were given, then consider the choices given…

void aspen
#

it's asking why about a logic error. the code itself runs fine.

#

if the sum is odd however, you aren't going to get the expected result

south rock
verbal vale
#

it wont make a double out of it 👀

#

or the double will itself be a int