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

0

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

+5

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

+4

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.

+2

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

0

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.

0

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