online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
def analyseData(lst, isPositive = False): if len(lst) == 0: return 0 total = 0 count = 0 if isPositive==True: for num in lst: if num >= 0: total = total + num count = count + 1 else: for num in lst: total = total + num count = count + 1 return total/count print(analyseData([1, 2, 3, 4, 5], True)) #3 print(analyseData([1, 2, 3, 4, 5])) #3 print(analyseData([10,20,-30,45], True)) #25 print(analyseData([10,20,-30,45], False)) #11.25 print(analyseData([10,20,-30,45])) #11.25

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