Horje
heads or tails python Code Example
heads or tails python
from random import random

def heads_or_tails():
    guess = input('Pick heads or tails and then press eneter to play: ')
    if random() > 0.5:
        return 'tails'
    else:
        return 'heads'

print(heads_or_tails() + ' wins' + '!')




Python

Related
how to do speed test with python Code Example how to do speed test with python Code Example
pygame collisions Code Example pygame collisions Code Example
Convert csv to dictionary in Python Code Example Convert csv to dictionary in Python Code Example
phone numbers Code Example phone numbers Code Example
class in python Code Example class in python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7