Modern British number plates (a.k.a. registration marks or license plates) use the format AANNXXX where AA is a "DVLA memory tag" (basically a location code), NN is the age identifier, and XXX is three random letters. Your task is to, given a date, generate a random valid number plate with a date...
Specification Write the shortest possible code in any language that does the following: It takes two arguments, x and y, and generates x + y lines of text. The first x lines should consist of y nested pairs of square brackets separated by a space surrounding a single digit, which cycles from 1 to...
In this challenge, your past self comes back to help or hurt someone else! The task is simple: write a full program, not a function, that prints the first code submission on this site submitted by the previous user, in the language of your first answer. (In the case that your first answer was pur...
Several Mathematica functions have system-defined short forms, e.g., /@ for Map. Many of them are listed here: https://reference.wolfram.com/language/tutorial/OperatorInputForms.html However, there also exist some system-defined short forms for function-option combinations. E.g., Log2@ninstead ...
Imagine that you are a worker at a puzzle book making company. You are in charge of making sudoku puzzles. You decide to make your life easier, and write a program to do it for you. What you have to do: Write a program that outputs an 81 digit code. The code must be randomly generated, so as to b...
I'm currently working on a challenge which involves writing JavaScript players for a board game. I've also recently discovered private fields in JavaScript (a recent addition), which I thought would be useful to prevent entries from accessing forbidden objects and cheating the game. The only trou...
Is someone eavesdropping? (WIP) Alice and Bob, quantum physicists are being watched by Eve, a quantum FBI agent. Eve has quantum tunnelled underneath Bob's house and is tapping all his quantum channels. Luckily, Alice and Bob are using the BB84 protocol to exchange quantum keys to encode their qu...
Demonstrate some abstract algebra Consider a binary operator \$*\$ that operates on a set \$S\$. For simplicity's sake, we'll assume that \$*\$ is closed, meaning that its inputs and outputs are always members of \$S\$. Let's define some basic terms describing the properties of \$*\$. We can say ...
Road golf through the mountains You have a bunch of cities on a grid which you wish to link up. Roads can be placed on any tile that doesn't contain a city, and connect to all roads or cities adjacent to them, vertically, horizontally or diagonally. Roads can link up via cities, for example C \ ...
Convert Lambda Calculus to SKI-notation Lambda calculus is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. However, it's possible to translate pure lambda calculus into SKI-notation. This can b...
Remove All Comments for Code Golf code-golfstring Take a line of input (function arguments or stdin, etc.). Remove comments in it, where a comment starts and ends with `. Do not remove comments in string literals, which start and end with ". Return this string. The number of `s not inside string...
« first day (27 days earlier) ← previous day next day → last day (1075 days later) »