online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
def head_tails(p, n): probability = p ** n return probability # Test the function p = 0.5 # Probability of landing heads up n = 3 # Number of heads in a row result = head_tails(p, n) print(f"The probability of getting {n} heads in a row is: {result}")

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