Questions tagged [interactive]
Used for challenges that require user interaction during their runtime
22
questions
14
votes
2
answers
512
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 ...
9
votes
3
answers
439
views
Guess The Array
Problem author: https://stats.ioinformatics.org/people/5815
You are given a system with a hidden permutation of the numbers \$1, 2, 3, \ldots, n\$. Your task is to guess this permutation by asking the ...
88
votes
61
answers
23k
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 ...
51
votes
26
answers
10k
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 ...
10
votes
10
answers
2k
views
Play a dumb coinflip game
Write an interactive program or function which allows the user to play The Coinflip Game! The object of the game is to repeatedly flip a coin until you get the same result \$n\$ times in a row.
...
32
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 ...
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:
...
-4
votes
5
answers
236
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 ...
15
votes
3
answers
580
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 ...
36
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.
...
53
votes
58
answers
8k
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) ...
5
votes
2
answers
231
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 ...
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. ...
49
votes
23
answers
10k
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 ...
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 ...
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, ...
12
votes
5
answers
761
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 ...
11
votes
1
answer
530
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 ...
19
votes
18
answers
5k
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 ...
14
votes
3
answers
815
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 ...
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/...
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 ...