Linked Questions

39 votes
78 answers
5k views

Just had a 'spirited' conversation with a co-worker about the succinctness of the following BASIC statement: 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 It's the title ...
Judy's user avatar
  • 517
49 votes
57 answers
6k views

Challenge: Take a string of upper or lower case letters as input (optional), and calculate the score that string would get in a game of Scrabble in English. Rules: The score of each letter is as ...
Stewie Griffin's user avatar
33 votes
79 answers
19k views

Input The input is a single positive integer n Output The output isn with its most significant bit set to ...
Marcus Andrews's user avatar
37 votes
73 answers
9k views

Challenge Sandbox post Given a positive integer (K) Output a uniformly-random integer (Y) between ...
Luis felipe De jesus Munoz's user avatar
42 votes
55 answers
6k views

The sequence of Fibonacci numbers is defined as follows: \$ F_0 = 0 \\ F_1 = 1 \\ F_n = F_{n-1} + F_{n-2} \$ Given a Fibonacci number, return the previous Fibonacci number in the sequence. You do not ...
pxeger's user avatar
  • 25.3k
27 votes
57 answers
4k views

What? Many programming languages, both practical and esoteric, have functions, methods, etc to convert a given string to a decimal number. This is how the process might work: For each character in ...
SunnyMoon's user avatar
  • 2,709
35 votes
51 answers
6k views

Make a Windows style Loading bar by the following instructions. (notice that this is different than Loading... Forever) Your output should start by [.... ]. ...
Matthew Roh's user avatar
  • 5,415
39 votes
45 answers
5k views

The goal here is to simply reverse a string, with one twist: Keep the capitalization in the same places. Example Input 1: Hello, Midnightas Example Output 1: ...
user avatar
29 votes
68 answers
5k views

Challenge Weirdly, this hasn't been done yet: output the current date. Rules The date format you should follow is as follows: YYYY-MM-DD Where the month and ...
Beta Decay's user avatar
  • 23.6k
21 votes
71 answers
12k views

This is a simple task. Given a positive or negative real number, round it to the next whole integer closer to zero. The challenge Take input through any reasonable form (stdin, function, etc.) of one ...
moltarze's user avatar
  • 2,578
36 votes
50 answers
7k views

I was expecting to post something more complex as my first puzzle in PCG, but a particular, uh... homework question on Stack Overflow inspired me to post this. They want to: print the following ...
sampathsris's user avatar
46 votes
35 answers
6k views

Loves me, Loves me not This simple kids' game is old, but still popular. Since we are living in 21st century now, let's digitize it! Specification Program must take no input, unless you are using a ...
MatthewRock's user avatar
38 votes
41 answers
4k views

Definition An arrowhead matrix is a matrix that has all entries equal to 0, except the ones on the main diagonal, top row and leftmost column. In other words, the matrix should look like this: * * * *...
Mr. Xcoder's user avatar
  • 42.9k
6 votes
72 answers
10k views

You have to create a code which prints :) a random number of times from 1 to 255 inclusive. Your output may not contain any whitespace. Your score : The ...
Mukul Kumar's user avatar
  • 2,715
48 votes
32 answers
8k views

Write a program or function that takes in a positive integer (via stdin, command line, or function arg) and prints or returns a string of that many of these small triangles tiled together, alternating ...
Calvin's Hobbies's user avatar

15 30 50 per page