This project aims to put most of the functionality of a guess the number game into 1 line. It was mostly a test, and a short little challenge since I was bored. I was able to include comparison of the input to the answer, and feedback generation all into one line. See inside to check it out. Hit space to guess, and the green flag to reset. Feedback: "More": Your input is too high. "Yes!": You got it right. "Less": Your input is too low.
I was able to do this mostly because I tried to create a decent guess-the-number setup on my TI 30X IIS calculator a few months ago. There were two drawbacks to that. first, you had to cover the screen while setting the random number. Second, it displayed the calculations it was doing, so I had to do some things with logarithms to make the number difficult to guess algebraically. With this project, however, the calculations aren't displayed, so I could get away with a lot simpler math. However, it still took a bit of thinking to get the feedback generation in that same line. What can you accomplish in just one line Scratch?