Mark Georgevich

Greenhorn

Posts: 14

posted 7 months ago

Here is my code:

My answer is correct except Zybooks is putting the decimal point in the wrong place. Why is this?

✖ Testing with gasPressure = 100 gasMoles = 1 gasTemperature = 273

Expected output: Gas volume: 22.698481533 m^3

Your output: Gas volume: 226984.81533 m^3 its wrong because my decimal point is not between the second 2 and the 6.

Tests aborted.

My answer is correct except Zybooks is putting the decimal point in the wrong place. Why is this?

✖ Testing with gasPressure = 100 gasMoles = 1 gasTemperature = 273

Expected output: Gas volume: 22.698481533 m^3

Your output: Gas volume: 226984.81533 m^3 its wrong because my decimal point is not between the second 2 and the 6.

Tests aborted.

Stefan Evans

Bartender

Posts: 1837

10

posted 7 months ago

So if you get a calculator and work out 100 x 273 x 8.3144621 what do you get?

Also note that you never use the "pressure" variable in your calculation for the gas volume.

Also check your calling method. It doesn't affect the answer too much in this case because multiplication is associative, but I think you have switched the order of a couple of values.

Also note that you never use the "pressure" variable in your calculation for the gas volume.

Also check your calling method. It doesn't affect the answer too much in this case because multiplication is associative, but I think you have switched the order of a couple of values.

posted 7 months ago

Mark Re: your post.

Please always UseCodeTags (that's a link) when posting code. I'll do it for you this time.

Please always UseCodeTags (that's a link) when posting code. I'll do it for you this time.

All things are lawful, but not all things are profitable.

Don't get me started about those stupid light bulbs. |