Even if it is difficult to test one's code, it's necessary to test it before posting.
6
Anonymous
And when one has a problem with their code, sitting in chat and saying "help me plz" every few minutes does not motivate people to help you. Especially when one does not seem to learn from one's mistakes or make an attempt at learning more through resources others have provided.
@El'endiaStarman I think T<char> allows for more commands as you can use and ascii character and it will be the same amount of bytes, and you can relate what the char is to what the action does, like m[ for floor and m] for ceil.
Well, technically, I have 0-10, 1j (sqrt(-1)), their negations, and 12 special constants ($0...$l,$j), so I could have 36 library ops that only need two bytes to choose between.
@El'endiaStarman I was replying to: @Mego That's pretty much what $ does. I also have four libraries: M T Z J P (math, trig, lists/strings, bitwise ops, and itertools/matrices).
To the people who voted for Numbers and Math on strawpoll.me/6096370 does my latest challenge satisfy you or would you be more interested in harder problems?
@Calvin'sHobbies I think something more towards algorithms and mathematical functions (like the Phi(not Pi) challenge) would be more fun. As @El'endiaStarman said, it is quite an easy challenge, just multiply everything and unique filter (which most languages have an operator for).
There have been many day of the week challenges on this site. This is just one example.
This challenge is to make a game, where you randomly select a valid date on the proleptic Gregorian calendar, print that date, take a player's guess as to what day of the week that was, and then verify that g...
The "right" thing to do would be to leave it up, put it on hold pending changes, then reopen it when it's ready. But since there hasn't been any feedback, only downvotes, I'm inclined to think that it may continue to accumulate downvotes without feedback while it's on main.
Right, but I'm pretty sure Sherlock9 wouldn't have a problem with that. Forgot we were suggesting the Sandbox, where it might stay for hours if not days.
In any case, if he improves it quickly enough, deletion is not necessary at all.
@feersum I've had to write and maintain Perl scripts on my employer's Windows-everything infrastructure. For doing simple I/O things there's really no difference across OSs that I noticed.
I've used Ruby a bit. It's pretty decent for an interpreted language and after you've drilled it into your head that everything is an object, the syntax is pretty nice
@AlexA. I think Ruby's syntax is something... special. I'd never write real software in it, but it is interesting to use. I'd use Crystal but it isn't for Windows.
If you're forced by circumstances to produce a Javascript program, it would be cooler to use something that compiles it rather than having to do it directly.
This one is inspired by Calvin's Hobbies recent multiplication table challenge.
Write a function or program that takes an integer N as input and prints or returns a N-by-N unique multiplication spiral. The code must (in theory) work for N between 0 and 1000 (outputting this can be hard though). ...
You can achieve 5/9 density by infinitely tiling this pattern horizontally:
010101
110110
101010
This does not however tile the plane.
I also did an exhaustive search for 3x6, and found that 10/18 was optimal. Any tiling of the plane with a greater density of 10/18 must contain blocks of 3x6 ...
A man has two devices.
A time machine - He can control this machine by thinking. It allows him to travel from any point in time to another point in time in the past or future (or even the present point in time) in no time at all. Note that if he travels to the past from B to A, then all normal ...
This is my first try here and the idea is inspired from a real problem.
Group data entries in 4 categories based on 3 rules
The data input contains 200 rows in the following format:
Name, Size, Tag1, Tag2, Tag3, Tag4
Data 1, 50, orange, apple,,,
Data 2, 1400, apple, pineapple, melon,,
Data 3, ...
Count the number of sides on a polygon
Given a black and white image of a polygon return the number of sides.
The edges are at least 10 pixels long, and the polygon is completely contained within the image, and the polygon as well as it's complement is connected (there are no isolated islands) ...
Count the number of sides on a polygon
Given a black and white image of a polygon return the number of sides.
The edges are at least 10 pixels long, and the polygon is completely contained within the image, and the polygon as well as it's complement is connected (there are no isolated islands) ...
@xsot @xnor @xsot When you say the obvious solution, do you mean something like this? lambda n:list("({})^2+({})^2)".format(i,j)for i,j in product(range(-n,n+1),repeat=2)if i*i+j*j==n)
Oops misread the question
`from itertools import*` `lambda n:sum(1 for i,j in product(range(-n,n+1),repeat=2)if i*i+j*j==n)`
My University tried to do something similar and blocked all GET request with words like sex in its name. Tried to a sextic interpolation on WolframAlpha. Didn't go well.