No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
2 Posted Topics
So I tried making my first program but it didn't work, but I can't figure out what is wrong with it. I have added some commentary with the code: [code]#!/usr/bin/env python import sys from random import randrange, shuffle, choice, sample DOORS = ['ant','ant','ant','bee','bee','bee','car','car'] def pickdoor(picked): """Returns a number representing the … | |
Hello, I need help with editing this program: [code]#!/usr/bin/env python """ Monte Carlo simulation for the Monty Hall Problem: http://en.wikipedia.org/wiki/Monty_Hall_problem. """ import sys from random import randrange, shuffle, choice DOORS = ['car', 'goat', 'goat'] def pick_door(): """Return a number representing the player's first choice.""" return randrange(3) def reveal_door(pick): """Return the … |
The End.