2
$\begingroup$

At work we are doing a coding competition on hackerrank – it is real coding – you are given input and you have to code a program that produces the correct output.

Now, I would like to promote this kind of challenge/puzzle at an event, where we will not have access to computers. I'm looking for a similiar kind of puzzle, but with pencil and paper.

Is there some way to create coding based puzzles with just pen and paper? (It can be trivial)

$\endgroup$
  • 1
    $\begingroup$ Just making sure here, is this an actual puzzle that we should try to solve; or are you asking for advice? $\endgroup$ – PerpetualJ Sep 12 '18 at 21:43
  • 2
    $\begingroup$ Sure there is, as long as someone looks over the code to determine who has a good program. The AP Computer Science A course has an entire test where you just have to write code on paper. I don't know the semantics of how to grade it, but it can be done. $\endgroup$ – Cubemaster Sep 12 '18 at 21:55
  • 2
    $\begingroup$ @PerpetualJ I think they're looking for actual advice & suggestions. $\endgroup$ – Hugh Sep 12 '18 at 23:17
  • $\begingroup$ @PerpetualJ I’m looking for suggestions. $\endgroup$ – Hurda Sep 13 '18 at 17:48
  • $\begingroup$ @Cubemaster writing code on paper is not fun and cumbersome to evalate $\endgroup$ – Hurda Sep 13 '18 at 17:49
1
$\begingroup$

I think you can try to use a Flowchart

You don't need to tell all shapes to the contestant. Just define which is input, output, process, and conditional shape. In my experiences, people who don't have any IT experience still feel it's easy to understand the flowchart. And it also can written on paper.

And then, you can start read coding based problem, define your input and output, and any additional rules, and let them start to draw the flowchart.

You can score the best solution based on whether it solves the problem or not and it should have clear and easy to follow instructions

I'm always using this method to teach algorithms to people who don't have an IT background.

$\endgroup$
  • 1
    $\begingroup$ As assumed in answer of Gareth - this is meant for people who know how to code. On the other hand - maybe this might be usefull angle $\endgroup$ – Hurda Sep 13 '18 at 17:47
1
$\begingroup$

(I am assuming this is intended for people who do know how to code but just happen not to have computers handy.)

Since writing code on paper is a miserable business, found mostly in interviews, one possibility is to make a puzzle based on reading rather than writing code. For instance:

  • "Describe as simply and clearly as possible what this function computes" (where the thing uses some interestingly overcomplicated algorithm to do something quite simple, as in the IOCCC -- though you probably don't want that level of obfuscation here)

  • "What's wrong with this code?" (where maybe there are lots of things wrong and the challenge is to find them all; or there's a single rather subtle bug and the challenge is to find it at all)

  • "What input will make this do the wrong thing?" (this, perhaps, with code deliberately written to misbehave in particular circumstances -- as in the Underhanded C Contest)

  • "What input will give such-and-such output?" (imagine that the code is doing some sort of encryption; the challenge is then to break it)

$\endgroup$
0
$\begingroup$

This sounds like an ideal job for Turing machines.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.