Questions tagged [interactive]

Used for challenges that require user interaction during their runtime

Filter by
Sorted by
Tagged with
31 votes
20 answers
3k views

Laggy text editor

Your challenge is to write a program that constantly prompts for input, and when input is given, output that five seconds* later. However, your program must continue prompting for input during that ...
user avatar
  • 30.5k
-5 votes
5 answers
200 views

Make an ed clone

ed is the standard text editor on Unix systems. Your goal is to write an ed clone. Task Write a program that reads an input stream and for every received end of line character, print ...
user avatar
5 votes
2 answers
214 views

The Great Betting Game

Your task is to create either a console "app" or a function which allows the user to bet on certain numbers or retire / claim rounds. Bets Your program or function will prompt for a command ...
user avatar
13 votes
1 answer
439 views

Interactive Maze Solver

Bob got kidnapped and is stuck in a maze. Your job is to help him find a way out. But since it is a very dark and scary maze, he can't see anything. He can only feel walls when he runs in to it, and ...
user avatar
  • 25.5k
11 votes
1 answer
485 views

Implement MENACE

Background MENACE (Machine Educable Noughts And Crosses Engine) is a rudimentary shallow machine learning algorithm for the game Noughts and Crosses, created by British computer scientist Donald ...
user avatar
19 votes
23 answers
2k views

Insist on a new filename

At runtime, keep prompting for a line of input until the user input is not the name of an existing file or directory or other file system item, relative to the current working directory. Then return/...
user avatar
  • 27.7k
52 votes
6 answers
2k views

Visualize Visual Eyes

You may or may not remember Xeyes, a demo program that came with (and, as far as I know, still comes with) the X window system. Its purpose was to draw a pair of eyes that followed your mouse cursor: ...
user avatar
  • 5,585
27 votes
14 answers
4k views

The shortest distance between two points is a line

Code a program or function to construct an interactive canvas on the screen of at least 400 pixels x 400 pixels in size. The canvas can be any color you wish, bordered or borderless, with or without a ...
user avatar
  • 42.8k
49 votes
23 answers
9k views

Type the Alphabet - as fast as you can!

Your task is to make a program that measures how fast you can type the letters of the English alphabet. The program shall only accept lowercase letters a to ...
user avatar
42 votes
25 answers
4k views

Impatiently wait for input

Your task today is to implement a time limit for getting input, a task I've found rather annoying to achieve in most languages. You will create a program function which prompts the user for input. ...
user avatar
  • 8,865
35 votes
19 answers
2k views

Map inputted ASCII characters

Be sure to see the other challenge, Reverse ASCII character map! The ASCII charset (American Standard Code for Information Interchange) is the most widely-used character encoding standard. ASCII ...
user avatar
  • 13.2k
35 votes
66 answers
5k views

Insist on an answer

At runtime, keep prompting for a line of input until the user inputs something (other than an empty newline), i.e. does not just press Enter or OK. Output or result is neither required nor prohibited. ...
user avatar
  • 27.7k
19 votes
18 answers
4k views

Create a simple line editor

In: a string without line breaks* Allow the user to edit and submit the line Out: the modified string (optionally with a trailing linebreak) The line editor must at minimum allow the user to: move a ...
user avatar
  • 27.7k
51 votes
26 answers
9k views

Create a Paint program!

Introduction One day, you were showing your kid how to draw on a computer. You type mspaint.exe in the run bar. To your horror, it says "No items match your ...
user avatar
52 votes
58 answers
7k views

Create a Checkbox

Write a program that creates a two-state checkbox that people can interact with using a mouse. Specifically, your program should achieve all of the following: Have a 8×8 pixel (or larger if desired) ...
user avatar
24 votes
17 answers
2k views

Implement a Stopwatch

Implement a simple digital Stopwatch, which will display the time elapsed in seconds and minutes, as described below. Important Please read both Display and Controls sections ! Display Time elapsed, ...
user avatar
  • 8,386
86 votes
60 answers
22k views

Shut down the computer!

Challenge: In the programming language of your choice, shut down the machine that your code was executed on. Rules No shutting down by resource exhaustion (e.g.: forkbomb to force shutdown) You are ...
user avatar
  • 2,904
15 votes
3 answers
544 views

PNZ (Guess 3 unique digits in order)

From a challenge in a programming book long ago, PNZ is a game where the user must guess three unique digits in the correct order. Rules: A random 3 digit number with no repeating digits is ...
user avatar
  • 709
12 votes
5 answers
752 views

See you in another life, brotha!

Most of us LOST fans out there remember the computer that Desmond had to type the characters "4 8 15 16 23 42" in every 108 minutes or the world would end (or would it?). The challenge here is to ...
user avatar
14 votes
3 answers
793 views

Check all the keys of a keyboard

Write the shortest program that waits for every key of a Standard 101 key US Keyboard* to be pressed and then exits writing OK! Every time a key is pressed the program displays on a new line the ...
user avatar