Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

simulieren mit python

#Gp13.py
from gpanel import *
from random import randint

n = 1000
print("Anzahl Würfe = " + str(n))
makeGPanel(-1, 8, -2*n/100, n/4 + n/100)
drawGrid(0, 7, 0, n/4, 7, 10)
p = [0] * 7
repeat n:
    a = randint(1, 6)
    if a == 1:
        p[1] += 1
    elif a == 2:
        p[2] += 1
    elif a == 3:
        p[3] += 1
    elif a == 4:
        p[4] += 1
    elif a == 5:
        p[5] += 1
    elif a == 6:
        p[6] += 1
setColor("blue")
for i in range(1, 7):
    fillRectangle(i-0.3 , 0, i + 0.3, p[i])
Comment

PREVIOUS NEXT
Code Example
Python :: function for getting the basic statistic of our Dataframe in one go 
Python :: change python version jupyter notebook 
Python :: extending the existing user model 
Python :: how to check if the update_one success in flask 
Python :: get a list of colors that appear of the image python 
Python :: mystring = "hello" myfloat=float 10 myint=20 
Python :: buscar elemento en lista python 
Python :: Tree : Top View 
Python :: egt id of current object django 
Python :: 1043 uri solution 
Python :: Replace and count string delimiter 
Python :: change font size pandas scatter_matrix 
Python :: Problème determinant algebre lineaire pdf mpsi 
Python :: how to usepygame.sprite.spritecollide 
Python :: kivy bind when text changes 
Python :: python arcade sound 
Python :: method for format age in python 
Python :: What is the purpose of open ( ) and close ( ) in os 
Python :: numpy documentation realpython 
Python :: why static kwyword not in python 
Python :: csv logger keras 
Python :: qt line edit set text python 
Python :: ModelCheckpoint 
Python :: What are zinc bandages used for? 
Python :: one small letter three big bodyguard 
Python :: dict from group pandas 
Python :: github/hacksofteare 
Python :: dataframe remove first row 
Python :: jouer à Snake 
Python :: how to use idl in python 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =