{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Programmieraufgabe 3 "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wichtig: Damit alle benötigten Pakete richtig eingebunden werden, führen Sie die nächste Zelle einmal aus."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np # makes numpy routines and data types available as np.[name ouf routine or data type]\n",
"import matplotlib.pyplot as plt # makes plotting command available as plt.[name of command]\n",
"from numpy import random\n",
"from numpy import linalg\n",
"\n",
"random.seed(0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## a) Würfelspiel Seven-Eleven\n",
"Simulieren Sie das Casino-Würfelspiel Seven-Eleven (Craps).
\n",
"Dabei wird mit zwei Würfeln solange geworfen, bis entweder die\n",
"Bank oder der Spieler gewonnen hat. Es sei $Y_k$ die Zufallsgrösse für die Augensumme im\n",
"$k$-ten Wurf. Der Spieler gewinnt, falls $Y_1 \\in \\{7, 11\\}$ oder $Y_k = Y_1$ für $k \\geq 2$. \n",
"Die Bank gewinnt, falls $Y_1 \\in \\{2, 3, 12\\}$ oder $Y_k = 7$ für $k \\geq 2$.\n",
"\n",
"