Aktionen

Dichterisches Coden: Unterschied zwischen den Versionen

Aus exmediawiki

Zeile 43: Zeile 43:
 
  verfasst werden"""
 
  verfasst werden"""
  
 
+
----
 +
==Python (Hands-On-) Tutorials==
 +
Pages zum praktischen Einstieg:
 +
* https://www.w3resource.com/python-exercises/
 +
* https://hourofpython.trinket.io/a-visual-introduction-to-python#/welcome/an-hour-of-code
  
 
----
 
----
 
 
== Boolean ==
 
== Boolean ==
 
Dieser Datentyp repräsentiert '''Wahrheitswerte''' aus der Menge ''True'' und ''False''. Wahrheitswerte kann man mit Operatoren verknüpfen.  
 
Dieser Datentyp repräsentiert '''Wahrheitswerte''' aus der Menge ''True'' und ''False''. Wahrheitswerte kann man mit Operatoren verknüpfen.  
Zeile 72: Zeile 75:
 
|}
 
|}
  
==Python (Hands-On-) Tutorials==
+
 
Pages zum praktischen Einstieg:
 
* https://www.w3resource.com/python-exercises/
 
* https://hourofpython.trinket.io/a-visual-introduction-to-python#/welcome/an-hour-of-code
 
  
 
----
 
----
 
 
=Jupyter Notebooks download & install=
 
=Jupyter Notebooks download & install=
 
*[[KI Workaround installieren]] (Anaconda und Jupyter Notebook mit deep learning environment)
 
*[[KI Workaround installieren]] (Anaconda und Jupyter Notebook mit deep learning environment)
Zeile 84: Zeile 83:
 
----
 
----
 
=Code Poetry=
 
=Code Poetry=
==about Code Poetry==
+
siehe: [["...Sprache"]]
* Seite zur Ausstellung "p0es1s. Digitale Poesie": http://www.p0es1s.net/p0es1s/intro_d.htm
 
* code poetry on monoskop: https://monoskop.org/Code_poetry
 
* wohl eine der umfangreichsten Onlinedatabaes über Netzliteratur: https://netzliteratur.net
 
** Netzliteratur (Projekte): https://netzliteratur.net/netzliteratur_projekte_a.php
 
 
 
Veröffentlichungen von Florian Cramer:
 
* https://www.netzliteratur.net/cramer/poetische_kalkuele_und_phantasmen.pdf
 
* https://www.netzliteratur.net/cramer/wordsmadefleshpdf.pdf
 
 
 
==Python Poetry Example==
 
 
 
#that poem do nothing, but can be compile! =D
 
##http://code.activestate.com/recipes/576413-the-poem-in-python/
 
 
#!/usr/bin/env python
 
#
 
########  The Poem  #########
 
###############################
 
#            by              #
 
# Marcello Bontempo Salgueiro #
 
#  08/08/08 - 04:16 AM        #
 
###############################
 
def ining(the_poem):
 
the_poem='is love'
 
the_poem is True
 
but , have, some = 'sadness', 'passion', 'love'
 
the_poem and 'love' is True
 
class Ify:
 
is_=('the', 'only', 'way','to')
 
try:
 
felling='real love'
 
except:
 
you={'are':'a frozen'}
 
the_poem; return '%s'%'ome explanation'
 
everything=['is like','a poem']
 
for felling_it_go in the_poem:
 
writing, your= 'felling','your thoughts';  your_love and fly
 
return str('ing of happiness')
 
belive, this = 'is', 'True'
 
 
nothing='is';w=ining('!')
 
just='love.'
 

Version vom 23. Oktober 2019, 10:47 Uhr

first steps in Python

Python Code Onlione ausführen (ohne lokales Installieren eines Pythoninterpreters:

Variablen setzen

EKI = "Entwickler Künstlicher Intelligenz aus Indien"
HGA = "Höchstens geduldeter Ausländer"
EKI = 1
HGA = 0
Summe = EKI + HGA

Ausgaben mit print()

print(sum)
print("Hallo Welt")

Eingaben mit input()

Text:

input("is EKI in the house? type true for 1 or false for 0:")

Ganzzahl:

int(input("is EKI in the house? type 1 for true or 0 for false:"))

Fließkommazahl:

float(input("is EKI in the house? type 1.0 for true or 0.0 for false:"))

if Anweisung

if EKI == 1:
     print("true")
else:
     print("false")

siehe auch: Übersicht von Vergleichsoperatoren

Kommentare

Einzeiliges Kommentar

# mit dem Hashtag zu Beginn einer Zeile wird auskommentiert

mehrzeilige Kommentare:

"""In 3 Anführungszeichen
können mehrzeilige Kommentare (__doc__strings)
verfasst werden"""

Python (Hands-On-) Tutorials

Pages zum praktischen Einstieg:


Boolean

Dieser Datentyp repräsentiert Wahrheitswerte aus der Menge True und False. Wahrheitswerte kann man mit Operatoren verknüpfen.

In der folgenden Tabelle sind logische Verknüpfungen zusammengefasst, wobei EKI und HGA in diesem Falle Bool'sche Variablen darstellen, die nur die Werte

  • 0 bzw. False

oder

  • 1 bzw. True

annehmen können:

...in the backery
EKI HGA not EKI EKI and HGA EKI or HGA EKI ^ HGA (xor)
False False True False False False
False True True False True True
True False False False True True
True True False True True False



Jupyter Notebooks download & install


Code Poetry

siehe: "...Sprache"