Linked Questions
10 questions linked to/from I shift the source code, you shift the input!
150 votes
162 answers
24k views
I double the source, you double the output!
Your task, if you wish to accept it, is to write a program that outputs a positive integer (higher than 0). The tricky part is that if I duplicate your source code, the output must be double the ...
58 votes
72 answers
12k views
I reverse the source code, you negate the output!
Your task, if you wish to accept it, is to write a program that outputs a non-zero number(can be integer or float). The tricky part is that if I reverse your source code, the output must be the ...
44 votes
69 answers
9k views
I reverse the source code, you negate the input!
Blatant rip-off of a rip-off. Go upvote those! Your task, if you wish to accept it, is to write a program/function that outputs/returns its integer input/argument. The tricky part is that if I ...
32 votes
57 answers
7k views
Internal Truth Machine
It's a normal truth machine but instead of taking input, it uses the first character of the program. Thus, internal. The 0 and 1 are plain characters, i.e. ASCII code 0x30 and 0x31 respectively. ...
30 votes
44 answers
5k views
Repeat your program to print Fibonacci numbers
Write a program fragment so that, when repeated N times it prints the Nth Fibonacci number. For example, if your program is print(x) then: ...
19 votes
62 answers
5k views
Write a function [closed]
I honestly can't believe this challenge does not already exist. The challenge Write a function. The specifics Your program must define some sort of callable function. This includes anything ...
29 votes
44 answers
7k views
I reverse the source code, you reverse the input!
Yet another blatant rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you wish to accept it, is to write a program/function that outputs/returns its string input/argument. The tricky ...
19 votes
25 answers
3k views
I palindrome the source code, you palindrome the input!
This is a rip-off of a rip-off of a rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you accept it, is to write a program/function that outputs/returns its input/args. The tricky ...
20 votes
15 answers
4k views
I multiply the source, you (probably) multiply the output!
Task The task is to write a program that outputs a consistent but otherwise arbitrary positive integer \$x\$ (so strictly greater than 0). Here's the catch: when the source is repeated \$N\$ times (...
4 votes
6 answers
650 views
I Rot-13 the source code, you Rot-19 the output!
This is alternate of a rip-off of a rip-off of a rip-off of a rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you accept it, is to write a program/function that outputs/returns its ...