How to call idle in python

藏色散人
Release: 2019-11-05 11:01:47
Original
4227 people have browsed it

How to call idle in python

How to call idle in python?

First we click on our start menu, click 'IDLE (Python 3.6 64-bit)' in the python directory installed in the start menu, and enter IDLE, as shown below:

How to call idle in python

The interface in the picture below is the interface of IDLE. We can change python in this interface. In the window of the picture below, you can see that '>>>'IDLE is ready Okay, let's write python just after '>>>', as shown below:

How to call idle in python

Here we use a print function in IDLE to do a simple To test, we directly enter "print("i love fise")" and press Enter. We can see that our first python program has been written successfully. The compiler faithfully prints out the content we want python to print, as shown below:

How to call idle in python

Next we use the print function again, directly enter 'print "i love fish"', and then press Enter, you can see that the compiler did not print what we wanted Instead, an error is reported. Here I will explain that the functions used in step 3 and step 4 are the same, but step 3 uses the syntax of python3, and step 4 uses the syntax of python2. Here, the editor The installation is python3, so the compiler does not recognize the syntax format of python2, as shown below:

How to call idle in python

Here the editor directly enters 'print(3 5)', we can see Python directly outputs the calculation result 8, as shown below:

How to call idle in python

Here the editor directly inputs '3 5', and you can see that python can also directly output the calculation result 8, as shown below :

How to call idle in python

Here the editor directly inputs 'print("i love fish"*8)', and you can see that python outputs 8 'i love fish', as shown below :

How to call idle in python

From the above series of tests, we have been able to simply use IDLE and learned some knowledge about the print function.

The above is the detailed content of How to call idle in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template