online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
import random attempts = 10000 current = 0 found = 0 bothgold = 0 while current < attempts: boxes = [['g','g'], ['g','s'], ['s','s']] random.shuffle(boxes) box = boxes.pop() random.shuffle(box) ballone = box.pop() if ballone is 'g': found += 1 balltwo = box.pop() if balltwo is 'g': bothgold += 1 current += 1 bg = float(bothgold) print("The probability is:", (bg / found))

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue