丢个骰子

###Concepts:
* Build-in module.
* Practice on module, class, object, tuple.
###Codes:
import random
class Dice:
def roll(self):
first = random.randint(1, 6)
second = random.randint(1, 6)
third = random.randint(1, 6)
forth = random.randint(1, 6)
fifth = random.randint(1, 6)
return first, second, third, forth, fifth
dice = Dice()
print(dice.roll())

上一篇:《记忆边缘》——团队冲刺阶段--Forth Day


下一篇:Back and Forth —— set的删除操作