Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Image Removed

...

width30%

About Python

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt metus diam, id consectetur nulla bibendum eu. Vestibulum sit amet tortor ultricies, volutpat nunc id, malesuada risus. Sed iaculis auctor felis dignissim vestibulum. Fusce molestie, ligula a aliquam tristique, eros diam vestibulum tortor, non efficitur erat dui sit amet eros. Quisque pharetra tempor turpis, vel pellentesque dolor vestibulum et. Morbi vel ex varius velit rutrum convallis. Proin vestibulum sapien ut aliquam dapibus.

Python is an interpretedhigh-levelgeneral-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aims to help programmers write clear, logical code for small and large-scale projects

BibTeX Referencing
reference@misc{wikipedia_2019, title={Python (programming language)}, url={https://en.wikipedia.org/wiki/Python_(programming_language)}, journal={Wikipedia}, publisher={Wikimedia Foundation}, author={Wikipedia}, year={2019}, month={Jun}}
.

Image Added

Panel
borderColor#dfe1e5
bgColor#eff9ff
borderWidth2
titlePage content

Table of Contents

...



Panel

How to download and install Python

...

Creating a python project in Microsoft visual studio

  1. In visual studio select File → New → Project
  2. Select "Python Application" and enter desired name for the project. Then press "ok"
    Image Removed

  3. Visual studio will now open your new project with a script named the same as your project

Installing packages in microsoft visual studio

  1. In visual studio select the Window → Other windows → Python enviroments. Python enviroments will now open in place of the solution explorer. 
    Image Removed
  2. In the dropdown menu where "Overview" currently is selected, select the "Packagestab and you will see a list of currently packages installed.

  3. Type in the package you wish to install in the search bar. For example "NumPy". Click the option "Run command: pip install numpy"

    Image Removed

  4. In the output log visual studio will now output "----- Successfully installed 'numpy' -----" if the install was sucsessful. 

and Python packages

You may download Python from their offical webpage or follow NTNU Innsida's tutorial on how to acquire the newest version of Python, linked here.

To best utilize Python, you will also need to install some extra packages. The packages most used in this wiki are NumPy, SymPy and Matplotlib, all part of the SciPy ecosystem.

Recommended for installing packages: Python distributions provide the language itself along with the most commonly used packages and tools. These downloadable files require little configuration, work on almost all setups, and provide all the commonly used scientific python tools.

Anaconda works on Windows, Mac, and Linux and provides over 1,500 Python/R packages.

Install packages using pip

If you already have Python and pip installed on your system, you can install all the packages by typing the following command into the terminal of your preffered editor.

Code Block
python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose

However, if you don't have pip installed or are using an editor without an easily found terminal (e.g. MS Visual Studio), try SciPy's general installation instructions, or our step by step installation guides.

Install packages on macOS

macOS doesn’t have a preinstalled package manager, but there are a couple of popular package managers you can install.

For Python 3.5 with Macports , execute this command in a terminal:

Code Block
sudo port install py35-numpy py35-scipy py35-matplotlib py35-ipython +notebook py35-pandas py35-sympy py35-nose




Panel

Getting started with Python

This wiki is (at the moment) based on that the users already have complete the course TDT4110 - Information Technology, Introduction or a similiar course. If not, or you just don't remember the basics of Python, a list of tutorials from beginner to expert is found at the offical Python webpage.

Some useful information when coding can also be found at Tips and tricks for coding.



Panel

Useful tutorials

When reading our tutorials, keep in mind that there are several exercises with solutions made on each topic. Whether you complete them or not, they often contain more information on your desired topic, either through plain examples or through special cases.

Children Display




BibTeX Display Table

...

width50%
Panel

Getting started with Python

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam tincidunt metus diam, id consectetur nulla bibendum eu. Vestibulum sit amet tortor ultricies, volutpat nunc id, malesuada risus. Sed iaculis auctor felis dignissim vestibulum. Fusce molestie, ligula a aliquam tristique, eros diam vestibulum tortor, non efficitur erat dui sit amet eros. Quisque pharetra tempor turpis, vel pellentesque dolor vestibulum et. Morbi vel ex varius velit rutrum convallis. Proin vestibulum sapien ut aliquam dapibus.

...

width50%

...

Useful tutorials

...