Questions tagged [interactive]
Used for challenges that require user interaction during their runtime
28 questions
14 votes
14 answers
2k views
Enter a personal identification number
In this challenge your code should allow the user to enter a four digit PIN. Rules If the user types a digit, your code should output a * symbol. If the user presses backspace it should delete the ...
8 votes
3 answers
1k views
Implement a 2-player version of 1D Chess
The game is played on a 1x8 board with the following setup: KNR..rnk White's pieces are on the left, while black's pieces are on the right. The king (K) can move 1 ...
14 votes
12 answers
4k views
The worst spaghetti code
Objective Write a full program that works exactly like the flow chart below. Each output, which is an integer, shall be through stdout, followed by a line feed. ...
9 votes
3 answers
533 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 ...
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. ...
36 votes
21 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 ...
-5 votes
5 answers
285 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 ...
6 votes
2 answers
272 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 ...
14 votes
2 answers
583 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 ...
12 votes
1 answer
660 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
23 answers
3k 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/...
53 votes
6 answers
3k 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: ...
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 ...
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 ...
10 votes
11 answers
6k views
Reverse ASCII character map
In Map inputted ASCII characters, I asked you to .. map inputted ASCII characters. This time, you will do the opposite, by immediately mapping all ASCII characters, and then mapping spaces over them. ...