Python on windows | Sololearn: Learn to code for FREE!


Python on windows

I just downloaded python on my laptop and I’m still learning how to use everything but to see how it works I used a code from here on my laptop but it doesn’t output results. I’m confused on what I need to do different on Python on my laptop compared to here. I wrote the code the exact same way in both. shots = 4 score = 100 while shots > 0: result = input() if result == "hit": score +=10 shots -=1 elif result == "miss": score -=20 shots -=1 print(score)

5/2/2021 2:45:34 AM

Zachery Starks

5 Answers

New Answer


the core functionalities are the same on sololearn code playground as on your computer. 🤔


In addition to AKSHAY🇮🇳 [INACTIVE] I want to mention that in some cases you have to install IDLE separately. I don't remember whether this is the case on Linux or on Windows.


If you have downloaded python from the official website then you must be using IDLE. Be sure you are using IDLE in EDITOR mode not SHELL. To open in editor you have to just click on "new file" in "file" menu


I guess you are double clicking the PYTHON file 🤣🤣🤣 If you are doing that then enter this at the end of your program. input() Or you should run your program from CMD or use ide or text editor like vscode.


i know im too late to be here and u must have mastred python by now but better 2 know for others the problems is that the while loop never ends to reach that print :( cuz print is out of the loop