Stuggling to understand what the code means in Lasagna

Hi, I’m brand new here and just trying to figure the structure of everything out. In all of the tasks, I understand the instructions, but then the boxes with the code in it is confusing me.

Example: “import lasagna” and “lasagna.EXPECTED_BAKE_TIME”
What is this for? Is it telling me I’m supposed to type that code into the editor? Is it telling me that 40 is what output I’m eventually looking to get? I just don’t really understand how I’m supposed to interpret and use the information in these boxes. I would really appreciate any insight! Thanks so much!!

Could you possibly post a screenshot of where this is happening. I can’t see what the “box” is in reference too at the moment. Thanks :slight_smile:

Welcome btw, and thanks for asking the question here! :slight_smile: I’ve moved your post to a new thread so that it’s more easily found/triaged :slight_smile:

Thanks for the response!

Gotcha. Thanks. OK, this is showing that if you run the code prefixed by >>> , the expected output will be the next bit. So for the first task if we take your code and run:

import lasagna

then we’d expect that constant to equal 40.

Similar, if we call the function bake_time_remaining(30) we’d expect the output to be 10.

So the box is telling you how we expect your constants/functions to behave.

Different languages use different syntaxes for this. I was discussing on a PR this week with @kotp and @Meatball about this equivelent syntax in Ruby. I find it confusing too. The use of >>> is totally unintuitive to me. However, it’s something that is normal across lots of languages, and therefore worth familiarising yourself with on a per-language basis.

Hopefully that helps.

(For anyone on a screenreader - this is the tasks section on the editor page, with a box that shows input/output like this):

>>> import Lasagna

Ah! Now I get it. It all makes sense now. I was just so confused - like, why is it telling me to import lasagna when that’s the name of the file I’m creating? lol Thank you!!

1 Like

No probs! Glad to be of help :slight_smile: