How to restart a simple coin tossing game

前端 未结 4 1625
面向向阳花
面向向阳花 2021-01-16 16:43

I am using python 2.6.6

I am simply trying to restart the program based on user input from the very beginning. thanks

import random
import time
print         


        
4条回答
  •  深忆病人
    2021-01-16 17:30

    You need to use random.seed to initialize the random number generator. If you call it with the same value each time, the values from random.choice will repeat themselves.

提交回复
热议问题