PyZufall_0.1!

Ich habe mit großer Hilfe eines Freundes (php4you.de) mein erstes Programm fertig! Es ist in Python geschrieben. Die graphische Oberfläche (GUI für Graphical User Interface) habe ‚ich‘ mit Glade angefertigt.
Mit dem Programm PyZufall kann man das Werfen einer Münze simulieren und anschließend wird ausgegeben, wie oft Kopf oder Zahl geworfen wurde… Je höher die Anzahl der Würfe desto genauer kommt man auf das Ergebnis ’50-50′.

Hier einige Beispiele:

  • 2 Würfe: Kopf: 0 Zahl: 2 (0% | 100%)
  • 10 Würfe: Kopf: 6 Zahl: 4 (60% | 40%)
  • 100 Würfe: Kopf: 43 Zahl: 57 (43% | 57%)
  • 1000 Würfe: Kopf: 479 Zahl: 521 (47,9% | 52,1%)
  • 10000 Würfe: Kopf: 5081 Zahl: 4919 (50,81% | 49,19%)
  • 100000 Würfe: Kopf: 49835 Zahl: 50165 (49,835% | 50,165%)
  • 1000000 Würfe: Kopf: 499829 Zahl: 500171 ( 49,9829% | 50,0171%)

PyZufall

<- Graphik in OpenOffice.org erstellt…