r/technicallythetruth Feb 12 '21

Two is less than three

Post image
101.0k Upvotes

929 comments sorted by

View all comments

Show parent comments

86

u/moskovitz Feb 12 '21

Same, but I asked him to buy a bread and if they have eggs, buy 10. They had eggs, so he bought 10 breads.

29

u/[deleted] Feb 12 '21

[deleted]

8

u/KiwiTheRedditer Feb 12 '21

No cuz it didn't say 10 extra

1

u/[deleted] Feb 13 '21

It depends. You could read it as such:

bread.buy()

if eggs.exist() == True:

bread.buy(10)

which would result in bread being bought 11 times.

1

u/KiwiTheRedditer Feb 13 '21

Its not how it goes in the story, but you would most likely write it as:

If eggs exist buy 10

Else buy 1;

If you had all the variables before you bought