Untitled
unknown
plain_text
4 years ago
438 B
9
Indexable
import random def heads_or_tails(): #generating a random variable between 0 and 2 x=random.randint(0,1) #if x>=1 return 'heads' else return 'tails' if(x>=1): return 'tails' else: return 'heads' if __name__ == "__main__": random.seed(1) number_of_flips = int(input()) #running loop on number_of_flips for i in range(number_of_flips): print(heads_or_tails())
Editor is loading...