Tell me about read-only code on Grok
What is read-only code?
Read-only code is code that we prevent you from editing. You can't change or delete it! We've done this to provide more scaffolding for students.
Read-only code appears just like normal code, but 'faded-out' to indicate that you can't edit this. You'll easily work out what code is editable and what isn't once you try to edit it.
In a read-only problem, if you've messed up your code, just reset it and start again. The read-only code will stay there.
Why do we use read-only code?
Read-only code allows us to provide more scaffolding for students. In some Grok problems, we give you some of the code for the solution. This helps students get started!
In some cases, it's even more helpful to mark some of this 'pre-filled' code as read-only. For example:
- We might mark some code as 'read-only' to focus students on bits that are important. This could be highlighting a span of characters, or an entire line.
- We might mark some lines of code as read-only if it uses a concept that students haven't yet learned. This allows students to engage with more complex code (a sneak peak of what's coming!) but not have to understand all the intricacies of it yet.