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
~542 People Reached
Favorite Forums
Favorite Tags
Member Avatar for lorayyne

I can't get the math to work in this program. The 'coinflip' flips a coin until it finds either the sequence heads-tails-tails or heads-tails-heads. My issue is that when I run it, the program will perform way more trials than told, and will only account for a random few in …

Member Avatar for woooee
0
181
Member Avatar for lorayyne

Hi all, This is a problem that has been holding me up for a while in Python. I frequently get issues relating to "global ___ is not defined" and cannot figure out what I'm doing wrong. Here is a coin-flip function I wrote: [code] def coinflip(): import random import time …

Member Avatar for targ
0
212
Member Avatar for lorayyne

Hello, I am trying to write a program that flips a coin until it gets the sequence "heads tails heads" and then stops and says how many flips it took to get that sequence. This is what I have so far: [code]import random import time import string def coinflip(): heads …

Member Avatar for lorayyne
0
149