lehrkraefte:snr:informatik:glf22:python:listen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
lehrkraefte:snr:informatik:glf22:python:listen [2022/10/25 21:15]
Olaf Schnürer [Aufgabe zum Listen-Erzeugen mit interner for-Schleife]
lehrkraefte:snr:informatik:glf22:python:listen [2023/01/19 23:26]
Olaf Schnürer [Listen von Zahlen graphisch darstellen]
Line 535: Line 535:
 </code> </code>
 </WRAP> </WRAP>
 +
 +===== Listen von Zahlen graphisch darstellen =====
 +
 +<code python saeulendiagramm.py>
 +from matplotlib import pyplot
 +
 +xWerte = [i for i in range(-10, 30)]
 +yWerte = [(x-3)*(x+2)*(x-25) for x in xWerte]
 +pyplot.bar(xWerte, yWerte, color='blue')
 +pyplot.show()
 +</code>
 +
 +<code python graph.py>
 +from matplotlib import pyplot
 +
 +xWerte = [i for i in range(-10, 30)]
 +yWerte = [(x-3)*(x+2)*(x-25) for x in xWerte]
 +pyplot.plot(xWerte, yWerte, color='blue')
 +pyplot.show()
 +</code>
  
 ===== Weiteres Material ===== ===== Weiteres Material =====
  • lehrkraefte/snr/informatik/glf22/python/listen.txt
  • Last modified: 2023/11/21 12:37
  • by Olaf Schnürer