Code Python 3, 245 bytes
E=print
def F():
B,C,A=1,1,1;yield 0
while True:yield B;B,C,A=B+C+A+1,C+A+1,A+1
C=int(input())
D=0
for A in range(C):
E(end='*'*(C-(C-A)+1));B=A
while 0<B:E(end=' '+chr(42+B)*B);B-=1
E();D+=1
for A in F():
if D==0:E(end=str(A));break
D-=1
Try it online!
What it d...
Okay, so: for a given n, draw the line normal to f at x = n. Then find all the points where that normal line intersects f(x). Then take the set of x values of those intersections, and plot it against n (with n being the x value and the set being y values)?
Question:
You have to print(STDOUT) the word "Print" such that each letter of "Print" appear as many time as they had appeared in the text before.
Example:
| Counter| Output |
| -------- | -------------- |
| 1 | Print |
| 2 | PPRRIINNTT |
|3 |PPPRRRIIINNNTTT|
This has to be p...
Woodchuck, 1161 bytes
Woodchuck is a derivative of BF which uses binary trees. Here is the hello world program.
>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[^^<>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[>]>^<^[^]^>>[^^<>>[>]>^<^[^]^>>[>]>^
Given string s of even length as input, randomly capitalise exactly half of the letters.
You can assume the input will always be a non-zero, even length
You can assume the input will consist of only lowercase letters ([a-z])
There must be an equal probability of each letter being capitalised
Exa...
@NewPosts It says that there is an equal chance of each letter being capitalized, which implies that it's possible for every character to be capitalized/not capitalized, but it also says that exactly half of the characters should be capitalized. I'm not sure how to interpret that.
@RedwolfPrograms Yeah, it depends on how your language handles "doesn't make sense" errors. There isn't any possible answer that satisfies the same condition as grouping on a positive integer, namely that concatenating the subarrays of the result gives you the original array back. So you either pick some bogus answer that might be convenient, or you say "Nope, that doesn't make sense, can't do it."
@AaroneousMiller exactly half of the characters should be "selected" for capitalization, and each character should have an equal chance of being "selected". Basically every possible permutation should have an equal chance
Instead of taking the number of capital letters and checking if it's the same as half the string length, I add -1 for every capital letter and 1 for every lowercase, and see if it's 0
can anybody confirm - checking a 50% for each element in the string to be capital and stopping after len/2 uppercases does NOT have an even chance to generate all?
brain kinda mushy right now but i'm pretty sure that shafts the elements near the end of the string
just consider 4 chars - the first has a 50/50 to be caps, the second has a 50/50, and then there's a 25% chance we've hit the cap so the third one only has a 37.5% chance to be capitalized
I have an idea: A video game where hacking is totally allowed. But there's a twist: There's no centralized game server. Everyone runs their own server, with input from all other players. So you could hack, and give yourself anything you wanted on your server, or even fake items in a way that can convince other vanilla servers, but other people can design hacks that filter out people who are obviously hacking. So there'd be no consistent "reality".
You could easily win on your server, but who knows if you're winning on others'? And even if you know you are, is that the "correct" one? It makes it so that hacking too badly isn't rewarding.
E.g., if you just wanted to win at any cost, literally nothing stops you making a hack that instantly kills all the other players (but they could just continue playing in their reality, and ignore that they were killed, if they had the right hacks). But what would be the reward? You might as well just print "you win!" to the screen.
So I have a feeling in games where it doesn't instantly become utter chaos, people would hack just enough to have a slight edge over vanilla, and it would create a fairly balanced system.
You could also mod the game super easily. If you want to add a weapon or something, just make a mod that adds it on your server, and send out a packet to the other servers advertising you're using it (so they can sync up with you if they also have the mod).
@Mayube I've never played it, but I also think it looks really fun. I do enjoy Fluxx, which is basically the same thing but without the make-up-your-own-cards aspect.
@cairdcoinheringaahing I can totally understand why it's like that, but it would be nice if (for example) entering a room could stop it freezing so that rooms that are read a lot, but only read, wouldn't freeze
specifically, people have moved its messages from the Vyxal room into this room before, which a) isn't allowed because it wasn't relevant and bots aren't allowed here, and b) we already specifically warned against at least once lol.
I explicitly remember dreaming a golf to my Jelly enigma machine, waking up and it worked first time. I wasn't sure if I should be proud, or if I should stop golfing for a bit :P
@Fmbalbuena while user:Fmbalbuena is laughing emojing: post "@Fmbalbuena Did you just emoji a sound that managed to soundly jumpscare me in a sound cause in a profile posting in a soundly managed chat?"
was about to ask if there's an idiom for changing a quad variable to execute stuff with it then restore the original value but then i realized i can actually try writing something and wow i actually didn't expect them to not be global so you can just set `⎕DIV` within a dfn to whichever setting makes more sense there and don't have to worry about that messing anything else up
CMQ: What should be the name of an operation that takes a list L and a number N and splits L into N pieces of equal length? E.g. [1,2,3,4,5,6], 3 => [[1,2], [3,4], [5,6]]
@rues Well, I'm using a negative number as the placeholder (Try it online!) because then you can control what happens if the lengths don't match up. ¯1 discards excess elements, ¯2 would error, and ¯3 would recycle the data to fit.