Use TURBO mode to see the demonstration pattern. (Press the <Shift> key and click the Green Flag for TURBO mode). The "1 Line Challenge" is to produce an interesting pattern using only ONE line of code to calculate the color of each pixel. YOU MAY ONLY CHANGE THE "set pen color to ..." LINE IN THIS PROJECT TO MEET THE CHALLENGE! "See Inside" for more Rules, Rewards, Tutorials etc. Please put your remixed "1 Line Challenge" Projects in the Studio https://scratch.mit.edu/studios/2825709/ If you just had to break the rules please put your "Not Quite A 1 Line Project" projects in this studio instead https://scratch.mit.edu/studios/2825759/
Not sure if i met the rules, but i wanted to show a cool thing you can do with logical expressions (=, <, >, not, etc). If the statement is true it returns 1, and if its false, it returns 0. As such, you can use this to create if loops. if (var == 1) then set color (1) else if (var == 2) then set color(5) can be coded as set color(((var == 1) * 1)+(((var == 2) * 5) see inside for a simple demo.