LOLCODE also allows converting string types, or YARNs, to the two numeric types. The syntax is the same: given a variable name, follow it with IS NOW A and the numeric type to convert to.

Converting strings to numbers can be useful when our program receives input using GIMMEH. Inputs are stored as YARNs, so to convert them to numbers, we’ll need to use IS NOW A.



Create a variable named purringVolume and read in a value for it.


Convert purringVolume to a floating-point number and print it.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?