An explainer describing how to use the Grok interface, how to read the problem examples, and how to run, test and mark a solution.
https://groklearning.com/
========
Hello Student,
I’m going to show you how to write and run an example problem in the Grok Learning System
You can see here I have an example problem
It says “Write a program that asks the user for their name, then greets them by saying hello.”
I have written a three line program here.
Line 1 has an input on the right hand side of an equals. The input displays the words “type your name” on the screen, and waits for the user to type something.
It saves whatever the user types to the variable on the left. This variable is called “Your name”
Line 2 prints the “your name” variable, which displays back to the user whatever typed into the input on line 1
Line 3 prints the sting “Have a nice day”
I can run this program by clicking the Run button on the top right.
Down in the bottom of the screen I see this output tab, and you can see it has displayed the string from my input, asking me for my name.
I’m going to click down here, and type Trevor, then I’m going to press enter.
You can see my program has printed my name back, and it has also told me to have a nice day.
That looks pretty good, so I’m going to mark my program and see if I’ve solved this problem correctly.
Oh no, it looks like I haven’t. Its telling me…
Okay, I’m going to close that
If I look on the left hand side here I see this example. This shows me what my program should look like if I run it. The blue text shows what my program does, and the black text shows what I might type.
If I run my program again, and type “grok”, and press enter, you can see my program doesn’t look exactly like the example. So I need to change my program to get it to do exactly the same as the examples.
I could run my program again, and try different inputs, like “Peter”, or “Sally”. You should run your program a lot before marking to see what your program does with different inputs.
Now I’m going to read back through the earlier slides to see if I can remember what I need to do to fix my program, and I hope you have fun experimenting with running your own programs.