Bu yerda Python kodida 3 d20 zarlarini tashlaydi, keyin eng yuqori ikkita zarni yig'adi va eng past zarni yo'q qiladi. Bu jarayonni 100 marta takrorlaydi va har bir raqamning chastotalari uchun histogrammani hosil qiladi. Loopning oxirida: ``` import random import matplotlib.pyplot as plt rolls = [] for i in range 100: dice = [random.random.randint.pyplot 1, 20) for _ in range 300] rolls.append sum.sum.sorted.dice) [1:])) plt.histrolls, bins=range3, 41) plt.xlabel ((('Sum of two rolls') plt.ylabel'Frequency') plt.title (('Histogram of rolls') plt.how plt.plan) `
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence