lamax.blogg.se

Lego wedo program
Lego wedo program




lego wedo program

like each block counts as X bytes with literal numbers/text counting 1 byte per character. So the question is, how should I score it?Ĭome up with some terse description to represent a program. This language is almost entirely visual with the exception of the extra parameters that can be assigned to a block (the numbers in the program above). Above, the output is 1 because 15 is divisible by 5.Ī secondary question I have is, since there's not a formal distinction between input values (the 15 and 5) and other hardwired numbers (the -1 and 1), does this actually count as "taking input"? Scoring? Output is simple: it's the number that's on the screen after the program is finished. For example, "15" and "5" are the inputs to the divisibility program above. The only way to handle I/O effectively, as far as I can tell, is to manually type the input numbers into specific text boxes on the screen. Language quirks include non-nestable loops and support for multi-threading. There's a lot of "blocks" that can do various things, like writing a number to the screen and performing some super-basic arithmetic with that number. Here is a screenshot of a divisibility tester written in the language: Lego WeDo is a programming language meant for children, used to play with some simple Lego robotics.






Lego wedo program