Let's say we have the input 5, which means ABCD is 0101. How does one get 5 from summing some subset of {6,4,1,-2}? Simple: 4+1 = 5. Therefore, WXYZ are 0110 because 0*6 + 1*4 + 1*1 + 0*-2 = 5. The corresponding decimal digit is 6.
@El'endiaStarman It doesn't look like it's possible to work backwards from what you got, that only gets the output digits from output variables - it doesn't relate input to output.
You don't have outputs at first though, so you can't get the decimal digit for binary code
This problem, at its core, is about converting between binary representations with different weightings. Binary is normally weighted like 8, 4, 2, 1. The filled-in table has the weighting 7, 5, -1, -3, and the problem table has the weighting 6, 4, 1, -2.
Okay, but in the 7,5,-1,-3 one, what does 4 have to do with ABCD 0,0,0,0 ? I see how it relates to VWXYZ, but we don't have either 4 or VWXYZ for the actual problem.
Output the points of this twisting fractal
Challenge
Output the points (in order) for the following fractal of size n:
(The above example is for n = 4)
We begin with the Binary Sierpinski Triangle, which can be generated recursively, by a number of cellular automata (including Rule 90), and...
> Any cells marked with an X have died, and any cells with an O have been blocked. The object of the game is for the spread of X's to stop. The player inputs a point i.e. 1,5 and the computer places an O there. The Xs spread to all adjacent cells every 2 seconds.
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance
>>> damn you python
File "<stdin>", line 1
damn you python
^
SyntaxError: invalid syntax
>>>
>>> x = 5
>>> x
5
>>>
=============================== RESTART: Shell ===============================
>>> x
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
x
NameError: name 'x' is not defined
I'd be less miffed if [1,2]+[3,4] gave an error or was undefined, but to cast to string, when they are nothing like lists (other than being a sequence of things), is just silly.
@DemCodeLines By example I mean the filled in one with 7,5,-1,-3. The 6,4,1,-2 is what I meant by the blank one. You need to see what input code it uses.
@MarsUltor ....sorta. Using \function[](){} was inspired by LaTeX, and I'll be taking a few things from Python. However, there's a lot more to the language that doesn't come from either. Some features will be copied from similar ones in Perl, Ruby, and Lisp.
@RenderSettings \ simply denotes that what follows is a function name. If we only ever used \ , we wouldn't be able to distinguish, say, \print and \log...
@DemCodeLines That's where you apply the weights given as El'endia was saying earlier. You'd apply them to the 4 in our example, so 0100 should work with weights 6,4,2,-1.
This is regarding a recent comment I came across on Reddit:
wanna get really freaked out? If you have Facebook on your phone try closing all the programs, then leave your phone near a radio/tv that is broadcasting in a different language overnight. I dare you. The next day, all of your facebo...
> The pay-off for users in allowing Facebook to microphone-lurk is that the social giant will be able to add a little tag to their status update that says they’re watching an episode of Games of Thrones as they sound off on their happiness (or despair) about the rise in background sex on TV these days.
> The general rule for addition in JavaScript is simple: You can only add numbers and strings, all other values will be converted to either one of those types.
What do you suggest? If we have Jeff and/or Joel come and personally TP the offender's house, it might actually make the problem worse. — Adam DavisJun 15 '10 at 18:59