Python is a software that is widely used in data analysis, machine learning, web development, network programming, automated testing, game development and other fields. Its power and ease of use have made it the programming language of choice for many developers and businesses. Runs on almost all operating systems, including Windows, macOS, Linux, etc. This makes Python a very flexible and portable programming language. Next, let the editor of Huajun explain to you how to run code in python and how to run code in python!
first step
In the start menu in the lower left corner of the computer, find the input box and enter cmd, then press the Enter key to open the command line window.
Step 2
In the command line window, enter python (if your Python version is 3.x and the environment variables are configured correctly, you can usually enter python directly;
Step 3
If the system has both Python 2.x and Python 3.x installed, you may need to enter python3 to start the Python 3.x environment)
Step 4
After pressing Enter, you should see a prompt similar to >>>, indicating that you have successfully entered the Python interactive environment.
Step 5
At the >>> prompt, you can enter Python code directly and press Enter to execute it.
Step 6
Type print("Hello, World!") and press Enter, and you should see the output Hello, World!.
The above is how the editor of Huajun compiled for you how to run the code in python and the method of running the code in python. I hope it can help you!