1234567891011121314151617181920 |
- import random
- def print_result():
- result = ""
- if random.randint(0, 1) == 1:
- result += "Heads"
- else:
- result += "Tail"
- print("Your result is: " + result)
- print_result()
- while True:
- if input("Another Y/N ").lower() == "y":
- print_result()
- else:
- print("The end")
- break
|