Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does this script print w/o you looking in the output?

Asked by
FiredDusk 1466 Moderation Voter
8 years ago
print(5+5/2)

1 answer

Log in to vote
1
Answered by 8 years ago

It prints 7.5 I don't know what you mean by w/o but mathematically that is correct It divides 5/2 because with PEMDAS division and multiplication is done before addition and subtraction in multi-step problems. The answer to 5/2 is 2.5 and then this adds 5 so the answer is 7.5

0
I knew that but I wanted to see what people think. I know now because of ScriptGuider's youtube video. Thanks anyways! FiredDusk 1466 — 8y
0
yw :) Volodymyr2004 293 — 8y
Ad

Answer this question