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
Last revision Both sides next revision
lehrkraefte:snr:informatik:glf22:python:listen [2023/01/19 23:21]
Olaf Schnürer [Weiteres Material]
lehrkraefte:snr:informatik:glf22:python:listen [2023/01/19 23:26]
Olaf Schnürer [Listen von Zahlen graphisch darstellen]
Line 540: Line 540:
 <code python saeulendiagramm.py> <code python saeulendiagramm.py>
 from matplotlib import pyplot from matplotlib import pyplot
-from math import * 
  
-xWerte = [i for i in range(-10, 11)] +xWerte = [i for i in range(-10, 30)] 
-yWerte = [cos(x*x) for x in xWerte]+yWerte = [(x-3)*(x+2)*(x-25) for x in xWerte]
 pyplot.bar(xWerte, yWerte, color='blue') pyplot.bar(xWerte, yWerte, color='blue')
 pyplot.show() pyplot.show()
Line 550: Line 549:
 <code python graph.py> <code python graph.py>
 from matplotlib import pyplot from matplotlib import pyplot
-from math import * 
  
-xWerte = [i for i in range(30)] +xWerte = [i for i in range(-10, 30)] 
-yWerte = [x*sin(x**3) for x in xWerte]+yWerte = [(x-3)*(x+2)*(x-25) for x in xWerte]
 pyplot.plot(xWerte, yWerte, color='blue') pyplot.plot(xWerte, yWerte, color='blue')
 pyplot.show() pyplot.show()
- 
 </code> </code>
  
  • lehrkraefte/snr/informatik/glf22/python/listen.txt
  • Last modified: 2023/11/21 12:37
  • by Olaf Schnürer