Data Science Training in Mumbai :- Execute Python programs using Visual Studio.

To create and execute python programs using visual studio we must first setup a python environment.

Below are the necessary software which needs to be installed on your computer to create your first application in python:

Steps:

  1. Visit https://www.python.org/downloads/ and download one of the following versions
  2. 1
    I recommend going with Python 3.6.x version because 3.6.4 is the latest version which will most likely remain stable while 2.7.x is just released to support legacy code.
  3. While installing python you need to select this option as it is very important and will help us further as we progress
    2

    After this click Install Now and let the software install itself

Now open Visual Studio on your pc and then click on Get Tools and features… inside Tools

3

Now in the feature installation window check and install the following features.

For Visual Studio 2017.

Contains Tools for Data Science.

4

Provides interactive tools for python application development.

5

For Visual Studio 2015 and 2013 we need to install the above packages from the visual studio website.

Now let’s create a new python program by adding a new project and selecting the Python Application.

6

The file structure of our newly created application is shown below:

7

And write the following code inside our PythonVS17.py file

print(1,2,3)
print('GM')
print(type('hello'))
print(type(3))
print(type(3.2))
a = 15
b = 24
print(a+b)

We can run and execute this code like any other application we run on visual studio preferably by either pressing on start or just starting without debugging.

Type in the above code is used to display the datatype of the value provided.

We get the following output when we run our application.

8










Syllabus of Data Science training in Mumbai

Comments

comments

This entry was posted in Class Room Training and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.