Posts by General Sebast1an
Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: If $x$ is odd...
Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. The program must figure out how to get the 2 fir...
Originally from Somewhere Else. I thought I'd continue making more drawing challenges here now that I discovered it. Make the Stack Overflow logo using the following criteria: The tray: ...
I have seen KOTH (King of the Hill) challenges before but it's still unclear to me how to properly make, or even play, such challenge. To get started, how do I make (or solve) KOTHs? An answer cou...
Disclaimer This challenge also exists in CGCC, but if you want to compete here (too), then hop in! Challenge Recreate "99 Bottles of Beer on the Wall", using the least bytes possible. Lyrics: ...
Introduction What is the Caesar shift cipher (ROT$n$)? It's basically a cipher sequence that changes a letter's value from the number chosen. If we use ROT1 on "games", we get "hbnft". The basic i...
Challenge Make a program that takes input of a string and abbreviate it. All letters of an abbreviation are capitalized, so keep that in mind. Whitespace, numbers and non-English characters ar...
Combine conditionals Python has its fair share of comparison operators and can actually be used in a single conditional. For example: x == 2 and y == 2 can be: x==y==2 Used on Make $2 + 2 ...
This is a feature-request post consisting of 2 actions for a reason... There's this thing that's been bugging me for a while in Code Golf CD. If you go to the tag page of the Challenges catego...
Background A House of I I went on an adventure Grabbed resources and making deeds Like start to work on the materials To build the shelter I need It was a marvelous one At least in the eyes ...
In this request (not really a feature-request but still tagged so anyway), I'd like to have detailed wikis on tags and maybe usage information on them too. Currently, these tags have usage info in...
C is a language I use most apart from Python and as someone who likes code golf challenges, what tips are there to golf in C?
What tips are there in fastest code, or what I like to call code speeding, challenges in Python?
I have this challenge in Code Golf and I wonder if I can repost it here for more users to come, and also continue making these since I actually like them. Can I post this challenge to Codidact?
Use for(;;) instead of while(true) The title's self-explanatory. A byte saver.
Use a+=[b] instead of a.append(b) The title says it all. a=[];b=10;print(a) a+=[b];print(a) Try it online!
Java (JDK), 311 301 296 bytes interface A{static void main(String[]x){String a=" bottle",b=" of beer",c=" on the wall. ",e;for(int i=99;i>0;i--){e=i>1?"s":"";System.out.println(i+a+e+b+c+(...
Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifi...
Renaming functions A funny, cool, and useful trick. If you have to write a single function multiple times (usually range() on for loops), then you can simply assign a variable by the function's na...
import* You can import some libraries and if you find yourself using: from lib import * Remove the space between import and *, because it works for whatever reason.
Replace for loops with string multiplication Let's say we have: for i in range(6):print(end="#") Try it online! This basically outputs # 6 times, which is self-explanatory in the code itsel...