Game 01
// Press ▶ Run to start the game
Concepts practiced
I used basic Python inputs, the random module, and a simple while loop to build my very first interactive program. I learned how computers make decisions through conditionals, how to handle bad user input without crashing, and how to structure a game that keeps going until a condition is met. I also learnt how to use a library named "Skulpt" to read my python code on a HTML platform as python doesn't run in a browser. Trickiest parts were handling the "input()" my game calls "Input()" multiple times inside a loop and each time it needs to pause and wait for the use to type something, and Javascript just happens to not be able to pause like that, so i used "Promise" to handle it. I had to over come many errors during my decoding spree and the one that taught me more was: blank output, appendline() function split skulpt's output into individual "p" tags and filtered out \n characters, which caused text to silently disappear and i fixed this by making aa single tag "pre". And finally got to feel the rush of seeing something I built actually work. A real back-and-forth between the player and the program