Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

34 строки
1.0 KiB

#!/usr/bin/env python3
#title :9-2.py
#description :Opdracht 9.2 - Random
#author :Marcel Haazen
#email :marcel@haazen.xyz
#date :04-11-2019 - 11:40
#version :0.1
#usage :python3 9-2.py
#notes :
#python_version :3.7.3
#==============================================================================
import random
def randomNum():
return 9 # Fair random number chosen by rolling a D20, Totally random everytime as you never know if its the same
def monopolyworp():
throws = 0
while True:
throw1 = random.randrange(1,7)
throw2 = random.randrange(1,7)
if throw1 == throw2:
throws += 1
if throws == 3:
print(throw1,"+",throw2,"= (Direct to jail)")
break
else:
print(throw1,"+", throw2, "=", throw2+throw1,"(Double)")
continue
else:
print(throw1,"+",throw2,"=", throw2+throw1)
break
monopolyworp()