Linked Questions

4
votes
37answers
4k views

“cat”-like program [duplicate]

The mission is to implement a cat-like program (copy all STDIN to STDOUT). Rules: You may only use standard libraries Indentation must be either two spaces or a ...
-6
votes
16answers
388 views

“Hello, name!”; [duplicate]

Challenge Your challenge is to make a simple program that takes the [input] and formats it as "Hello, [input]!" Input Either a function call variable or STDIN, this is the name. Can contain any ...
471
votes
846answers
155k views

“Hello, World!”

So... uh... this is a bit embarrassing. But we don't have a plain "Hello, World!" challenge yet (despite having 35 variants tagged with hello-world, and counting). While this is not the most ...
531
votes
237answers
122k views

Showcase of Languages

Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
160
votes
430answers
30k views

Implement a Truth-Machine

A truth-machine (credits goes to this guy for coming up with it) is a very simple program designed to demonstrate the I/O and control flow of a language. Here's what a truth-machine does: Gets a ...
173
votes
339answers
56k views

1, 2, Fizz, 4, Buzz

Introduction In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other ...
293
votes
153answers
103k views

Tips for golfing in Python

What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is ...
77
votes
186answers
15k views

“DDoouubbllee ssppeeaakk!!”

Super simple challenge today, or is it? I feel like we've heard a fair bit about double speak recently, well let's define it in a codable way... Double speak is when each and every character in a ...
153
votes
89answers
53k views

Tips for golfing in JavaScript

What general tips do you have for golfing in JavaScript? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to JavaScript (e.g. "remove ...
77
votes
191answers
14k views

Count up forever

Write a program that counts up forever, starting from one. Rules: Your program must log to STDOUT or an acceptable alternative, if ...
63
votes
81answers
13k views

Determine the color of a chess square

Your challenge is to write a program that outputs the color of a given square from the chessboard. This is how a chessboard looks: You can see that the square a1 is dark, and h1 is a light square. ...
42
votes
96answers
8k views

Halloween Golf: The 2spooky4me Challenge!

A current internet meme is to type 2spooky4me, with a second person typing 3spooky5me, following the (n)spooky(n+2)me pattern. Your mission is to implement this ...
135
votes
29answers
11k views

Making Future Posts Runnable Online with Stack Snippets

Stack Snippets were recently added to PPCG! Reminiscent of JSFiddle, Stack Snippets allow HTML, CSS, and JavaScript to be run directly in posts! Here is a very simple Stack Snippet: ...
29
votes
93answers
6k views

Print the ASCII table

The task is to display n characters of the ASCII table. You may write a function (or a program that takes the argument as a parameter, STDIN is allowed as well) that takes a parameter n, which will ...
17
votes
95answers
3k views

Print last inputted byte

Challenge You have one string of input bytes, output the last byte in it. Rules Your submission may be a program or function outputting the last byte in the input which is either a string, stdin or ...

15 30 50 per page