Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~216 People Reached
Favorite Forums
Favorite Tags
Member Avatar for Vihaio2012

Hello, I want to total up a variable that changes every time a function is run. [code]import random def flip(): h,t = 0,1 cheads, ctails, = 0,0 cflips = random.choice((0,1)) if cflips == 0: cheads += 1 return 'h' else: ctails += 1 return 't' def repeat(f,n): for i in …

Member Avatar for vegaseat
0
109
Member Avatar for Vihaio2012

Hello, I'm trying to write a coin-flipping program. I can get the program to produce a random coin flip result (represented as either "h" or "t") but I want to add the individual result to an ever expanding string. For example, the first result would be "h" and the big …

Member Avatar for scru
0
107