Skip to main content


Items tagged with: programming

Here is a algorithms/riddle i just solved that was kind of fun. So heres the setup. You have a circular table that spins with four evenly spaces opaque boxes on it around the outside. In each box is a coin that is either heads or tails. You get a maximum of 5 rounds, between each round you are blindfolded and the table ia spun randomly. During each round you can pick a box to open, look, the pick a second box to open and look. You can then flip none, any, or all, of the coins with open boxes. Then the boxes are closed before the next round. If at any point all four coins are the same then you win the game.

You must come up with a strategy that **guarantees** in 5 rounds or less that all 4 coins will be the same.

Tommorow i will take a picture of the flow chart i came up with the answer. In the meantime please give hints, answer, or thoughts in the comments but be sure to CW them. I will reply tomorrow with a picture of the answer and CW that as well. Good luck!

PS for a slightly harder version all the same rules apply except you need to pick both boxes to open simultaneously rather than one after thr other. With this harder version it is still possible in 5 rounds or less.

#riddle #algorithm #computerscience #programming #algorithms #puzzle


The truth is...

It's impossible to write a program in Pascal that will loop forever.

#Earth #forever #loop #universe
#pascal #computer #structured #programming #definitions
#context #perpetual #motion
#big #bang
TruthBeTold = A statement that is logically or literally true (or partly true), but seems to imply something that isn't true or is just plain weird. (for rhetoric, logic or propaganda studies... or just for fun)

pic credit: I.hidekazu
an arbitrary flow chart

#Hissp is a metaprogramming language for #Python.

Hissp implements a #Lisp dialect using a subset of functional Python. Hissp is written using a tree of nested tuples containing strings. Hissp provides a more traditional language called #Lissp, which is read into Hissp before being converted to Python. Hissp supports macros, a Lissp REPL, as well as full use of any modules or functions available to Python.

Website 🔗️:

#free #opensource #foss #fossmendations #programming

The PlsExplain programming language attaches a comment to every value that propagates with the value. Kinda cool.

#software #programming #PlsExplain

ok so you need to outline a rectangle on square grid, you know yer pixels... logically you can choose to do it on the inside of the rectangle, to make sure you don't go out of bounds, or on the outside if you need the in-bound pixels untouched... however a very common choice is to go completely insane and do the top and left edges on the inside and bottom and right edges on the outside:


bonege, empezando poco a poco, solo fue terminar el codigo que deje pendiente para poder preguntarle un millon de veces si quiero a la magicball (si programo con todo lo que puedo en esperanto)

Este sitio web utiliza cookies. Si continúa navegando por este sitio web, usted acepta el uso de las cookies.