Introduction to Python. Introduction. First Steps in Python. pseudo random numbers. May 2016

Ähnliche Dokumente
Algorithms for graph visualization

Der Wetterbericht für Deutschland. Read the weather reports and draw the correct weather symbols for each town.

MATLAB driver for Spectrum boards

There are 10 weeks this summer vacation the weeks beginning: June 23, June 30, July 7, July 14, July 21, Jul 28, Aug 4, Aug 11, Aug 18, Aug 25

Algorithms & Datastructures Midterm Test 1

p^db=`oj===pìééçêíáåñçêã~íáçå=

Employment and Salary Verification in the Internet (PA-PA-US)


ROOT Tutorial für D. Liko

Software development with continuous integration

GRIPS - GIS basiertes Risikoanalyse-, Informations- und Planungssystem

Dynamische Programmiersprachen. David Schneider STUPS

TIn 1: Feedback Laboratories. Lecture 4 Data transfer. Question: What is the IP? Institut für Embedded Systems. Institut für Embedded Systems

DOWNLOAD. Englisch in Bewegung. Spiele für den Englischunterricht. Britta Buschmann. Downloadauszug aus dem Originaltitel:

Getting started with MillPlus IT V530 Winshape

HiOPC Hirschmann Netzmanagement. Anforderungsformular für eine Lizenz. Order form for a license

Database Management. Prof. Dr. Oliver Günther und Steffan Baron Sommersemester 2002 (I)

Abteilung Internationales CampusCenter

KOBIL SecOVID Token III Manual

USB Treiber updaten unter Windows 7/Vista

RDF RESOURCE DESCRIPTION FRAMEWORK. Referentin: Claudia Langer

Einsatz einer Dokumentenverwaltungslösung zur Optimierung der unternehmensübergreifenden Kommunikation

Session 1: Classes and Applets

-Which word (lines 47-52) does tell us that Renia s host brother is a pleasant person?

Exercise (Part XI) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

E-License - Product Activation E-License - Produktaktivierung

p^db=`oj===pìééçêíáåñçêã~íáçå=

Exercise (Part II) Anastasia Mochalova, Lehrstuhl für ABWL und Wirtschaftsinformatik, Kath. Universität Eichstätt-Ingolstadt 1

Aber genau deshalb möchte ich Ihre Aufmehrsamkeit darauf lenken und Sie dazu animieren, der Eventualität durch geeignete Gegenmaßnahmen zu begegnen.

Mitglied der Leibniz-Gemeinschaft

ReadMe zur Installation der BRICKware for Windows, Version ReadMe on Installing BRICKware for Windows, Version 6.1.2

August Macke Abschied, 1914 Museum Ludwig, Köln

Listening Comprehension: Talking about language learning

Programmierung eines GIMP-Plugin

Graphische Benutzeroberflächen mit Matlab

Parameter-Updatesoftware PF-12 Plus

Instruktionen Mozilla Thunderbird Seite 1

ColdFusion 8 PDF-Integration

Effizienz im Vor-Ort-Service

Worx Landroid - Software Update

Was haben Viehweiden mit Software zu tun?

(Prüfungs-)Aufgaben zum Thema Scheduling

CABLE TESTER. Manual DN-14003

ROOMS AND SUITES A place for dreaming. ZIMMER UND SUITEN Ein Platz zum Träumen

Anhang A - Weitere Bibliotheken. Die Bibliothek Mail_02.lib ermöglicht das Versenden von s mit dem Ethernet-Controller

Abschlussklausur des Kurses Portfoliomanagement

After sales product list After Sales Geräteliste

1. General information Login Home Current applications... 3

Restschmutzanalyse Residual Dirt Analysis

Erzberglauf - Anmeldung

Tuning des Weblogic /Oracle Fusion Middleware 11g. Jan-Peter Timmermann Principal Consultant PITSS

ALL1681 Wireless g Powerline Router Quick Installation Guide

Open Source. Legal Dos, Don ts and Maybes. openlaws Open Source Workshop 26 June 2015, Federal Chancellery Vienna

Das Modul kann thermische oder 3-stufige Aktoren regeln, wie auch vier 0-10 VDC analoge Ausgänge.


Zum Download von ArcGIS 10, 10.1 oder 10.2 die folgende Webseite aufrufen (Serviceportal der TU):

Softwareschnittstellen

Extracting Business Rules from PL/SQL-Code

Supplier Questionnaire

HIR Method & Tools for Fit Gap analysis

H Mcast Future Internet made in Hamburg?

Prediction Market, 28th July 2012 Information and Instructions. Prognosemärkte Lehrstuhl für Betriebswirtschaftslehre insbes.

Kybernetik Intelligent Agents- Decision Making

XV1100K(C)/XV1100SK(C)

FAQ - Häufig gestellte Fragen zur PC Software iks AQUASSOFT FAQ Frequently asked questions regarding the software iks AQUASSOFT

Wählen Sie das MySQL Symbol und erstellen Sie eine Datenbank und einen dazugehörigen User.

microkontrol/kontrol49 System Firmware Update

miditech 4merge 4-fach MIDI Merger mit :

Der Adapter Z250I / Z270I lässt sich auf folgenden Betriebssystemen installieren:

Infrastructure as a Service (IaaS) Solutions for Online Game Service Provision

Teil 4,9 Ich habe mein Handy, aber wo sind meine Schlüssel?

KURZANLEITUNG. Firmware-Upgrade: Wie geht das eigentlich?

Funktionales Programmieren in Python

if ($rows == 0) { save_new(); } }

How-To-Do. Hardware Configuration of the CC03 via SIMATIC Manager from Siemens

Installationshinweise Z501J / Z501K Adapter IrDa USB Installation hints Z501J / Z501K Adapter IrDa USB

ELBA2 ILIAS TOOLS AS SINGLE APPLICATIONS

How to use the large-capacity computer Lilli? IMPORTANT: Access only on JKU Campus!! Using Windows:

UWC 8801 / 8802 / 8803

SELF-STUDY DIARY (or Lerntagebuch) GER102

If you have any issue logging in, please Contact us Haben Sie Probleme bei der Anmeldung, kontaktieren Sie uns bitte 1

Standardstufe 6: Interkulturelle kommunikative Kompetenz

2 German sentence: write your English translation before looking at p. 3

Technical Support Information No. 123 Revision 2 June 2008

Das neue Volume-Flag S (Scannen erforderlich)

Python Programmierung. Dipl.-Ing.(FH) Volker Schepper

NVR Mobile Viewer for iphone/ipad/ipod Touch

Preisliste für The Unscrambler X

M-CRAMER TRACKING. ONLINE TRACKING PLATTFORM Sie finden unsere Online Tracking Plattform unter

WTFJS? EnterJS Matthias Reuter

a lot of, much und many

Workflows, Ansprüche und Grenzen der GNSS- Datenerfassung im Feld

XV1100K(C)/XV1100SK(C)

Steht in der ersten Zeile #!/usr/bin/python und hat man die Ausführungsrechte gesetzt kann man es direkt ausführen.

Softwareupdate-Anleitung // AC Porty L Netzteileinschub

Workshop Quality Assurance Forum 2014

Transkript:

to to May 2016

to What is Programming? All computers are stupid. All computers are deterministic. You have to tell the computer what to do. You can tell the computer in any (programming) language) you like.

to What is? is a very powerful, but easy language. Why easy? You can learn it easily. It is like writing down logic in code, only that the code is the real code (Unlike many other programming languages). Why powerful? There is nearly nothing you cannot do: Calculate, Draw, Plot, Read data (from anywhere), Simulate, Analyse data, Web applications, Make real executable programs (GUI), interactive programs,... The best thing: Open Source: Probably somebody in the world has already done what you want to do.

to Workflow Write your code/program. No compiling step necessary Execute your program. Other languages: C,C++, Fortran. You have to compile, after writing your code, before executing.

to Executing python online www.trinket.io Sign up. Write your code. Run it.

to Our first line of code Variable definition name = value

to Console Output print name

to Variable types print type(name)

to Variable types string: sequence of characters ( Hallo ) integer: positive or negative natural number, inclusive zero (..,-2, -1, 0, 1, 2,..) float: floating point number (1,2345) bool: True or False

to Math expressions a + b a - b a * b a / b a ** b

to Examples i = 2 j = 5 print i, j, i+j k = 2.5 print k*i print i*k

to Logic operations if a==1: print "a ist 1" elif a==2: print "a ist 2" else: print "a ist irgendwas."

to Logic operators == < > <= >=!= equal smaller larger smaller or equal larger or equal not equal if a <= 5 and a >2: print "a ist 3, 4 oder 5"

to Lists list = [1,2,3,4,5] list = ["ha","he","hi","ho"] print "erstes Element: ", list[0] print "drittes Element: ", list[2]

to Loops for element in list: print "Listenelement ist ", element for element in range(10): print "Listenelement ist ", element while a <= 5: print a a = a+1

to Libraries import libraryname as othername common libraries: numpy, matplotlib.pyplot,...

to Using libraries import libraryname as othername common libraries: numpy, matplotlib.pyplot,... USAGE e.g.: import numpy as np print np.exp(1) array = np.array([1,2,3]) array auto = np.linspace(1,10,10)

to Functions def func name(input1, input2): print input1, input2 print input1*input2 return input1**input2

to Pseudozufallszahlen Pseudozufallszahlen sind Zahlenfolgen die durch einen deterministischen Algorithmus (Pseudozufallszahlengenerator) berechnet werden (und somit nicht zufällig sind). Für hinreichend kurze Sequenzen sehen sie jedoch zufällig aus. Bei jedem Start der Zufallszahlen-Berechnung mit gleichem Startwert (seed) wird die gleiche Zahlenfolge erzeugt.

to Zufallszahlen in Modul laden: import Zufallszahlengenerator mit seed [x] initialisieren:.seed([x]) Zufallszahl zwischen 0.0 und 1.0 aufrufen:.() Zufallszahl zwischen a und b aufrufen:.uniform(a, b) Ohne.seed([x]) verwendet die Systemzeit um einen Seed zu generieren.

to Aufgabe: Berechnen Sie π. Wählen sie ein geeignetes Koordinatensystem. Rechnen sie zufällige Punkte aus und bestimmen ob diese im Kreis liegen. Das Verhältnis der Flächen von Kreis und Quadrat entspricht dem Verhältnis der Zufallswerte in Kreis und Quadrat.