Use docstrings

This commit is contained in:
Martin Thoma
2022-04-02 07:58:37 +02:00
parent c500424956
commit 4b3b991273
12 changed files with 268 additions and 323 deletions

View File

@@ -1,30 +1,27 @@
########################################################
#
# Dice
#
# From: BASIC Computer Games (1978)
# Edited by David H. Ahl
#
# "Not exactly a game, this program simulates rolling
# a pair of dice a large number of times and prints out
# the frequency distribution. You simply input the
# number of rolls. It is interesting to see how many
# rolls are necessary to approach the theoretical
# distribution:
#
# 2 1/36 2.7777...%
# 3 2/36 5.5555...%
# 4 3/36 8.3333...%
# etc.
#
# "Daniel Freidus wrote this program while in the
# seventh grade at Harrison Jr-Sr High School,
# Harrison, New York."
#
# Python port by Jeff Jetton, 2019
#
########################################################
"""
Dice
From: BASIC Computer Games (1978)
Edited by David H. Ahl
"Not exactly a game, this program simulates rolling
a pair of dice a large number of times and prints out
the frequency distribution. You simply input the
number of rolls. It is interesting to see how many
rolls are necessary to approach the theoretical
distribution:
2 1/36 2.7777...%
3 2/36 5.5555...%
4 3/36 8.3333...%
etc.
"Daniel Freidus wrote this program while in the
seventh grade at Harrison Jr-Sr High School,
Harrison, New York."
Python port by Jeff Jetton, 2019
"""
import random