How to use Python if statement in Visual Studio 2019 - Methods of using Python if statement

Time: 2022-02-10Source: Huajun Software TutorialAuthor: Xiao Hulu

Friends, do you know how to use Python if statement in Visual Studio 2019? Today I will explain how to use Python in Visual Studio 2019 If you are interested in the method of if statement, please come and take a look with the editor. I hope it can help everyone.

Step 1: Double-click to open Visual Studio 2019 (as shown in the picture).


Step 2: Create a new project (as shown in the picture).


Step 3: Create a Python application (as shown in the figure).


Step 4: Configure the new project, you can modify the project name and location (as shown in the figure).


Step 5: Set variables. The first sentence at the beginning must be in the upper left corner without spaces.

​​ biaozhi= False #Set the variable. The first sentence at the beginning must be in the upper left corner and there is no space.

        name = 'AA' #Set variables (as shown in the picture).


Step 6: Write an if conditional statement to judge, and use # for python comments (as shown in the picture).


Step 7: Click the "Start" button (as shown in the picture).


Step 8: Finally run and preview the program (as shown in the picture).


The above is the entire content of how to use Python if statement in Visual Studio 2019 brought to you by the editor. I hope it can help you.

Related articles更多>>

Popular recommendations