Yes but no

Credit

361 points · 16 comments · view on lemmy.world

16 Comments

drolex@sopuli.xyz · 58 pts · 2y (2 replies)

What the hell is that question anyway? At which concentration? I hope this is not a serious chemistry test.

Ross_audio@lemmy.world · 6 pts · 2y (1 reply)

It is not asking about a solution. It only specifies carbonic acid so you can assume pure carbonic acid.

H___2CO___3

Carbonic acid reacts with water as a base to release CO2 and H2O.

So the pH of a solution of carbonic acid with water is an equilibrium of remaining dissolved CO2 and remaining acid. Which then relies on temperature and pressure.

Formula

Given that water isn't mentioned the only correct answer is 0

drolex@sopuli.xyz · 9 pts · 2y

??? pH is only defined in a solution of water.

But more importantly, the correct answer is 5

match@pawb.social · 31 pts · 2y (6 replies)

5 != "5"

CommanderCloon@lemmy.ml · 11 pts · 2y (3 replies)

Depends on the language though, sometimes 5 == "5" and 5 !== "5" (PHP & JS)

My guess is that a .trim() is missing somewhere

Edit: removed typo in example code

bleistift2@feddit.de · 3 pts · 2y (1 reply)

5! == "5" (PHP & JS)

is not valid in either PHP or JS

CommanderCloon@lemmy.ml · 1 pts · 2y

Thank you for pointing it out! That's my bad, that was a typo, I meant 5 !== "5" (it's the counterpart to the === comparator in both PHP & JS)

bleistift2@feddit.de · 1 pts · 2y
[ removed ]
Incandemon@lemmy.ca · 10 pts · 2y (1 reply)
[ removed ]
TonyTonyChopper@mander.xyz · 5 pts · 2y

x = x+1 therefore reality can be anything I want

dipshit@lemmy.world · 28 pts · 2y (2 replies)

you were supposed to provide an integer, not a string! users these days. pfft.

Batman@lemmy.world · 6 pts · 2y (1 reply)

5.toInteger()

kionite231@lemmy.ca · 6 pts · 2y

int('5')

Kolanaki@yiffit.net · 22 pts · 2y

Answer is actually a floating point value between 5.0 and 5.9 but the thing only displays a whole number.

prex@aussie.zone · 11 pts · 2y

I thought it was five.

beckerist@lemmy.world · 8 pts · 2y
[ removed ]
RootBeerGuy@discuss.tchncs.de · 4 pts · 2y

Cinco

edherjrrr@lemmy.world · 3 pts · 2y

It's paradoxical. It is, but it also isn't

Norgur@kbin.social · 2 pts · 2y

Oh, well then. I will take that into account the next time and do better then.