online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
"""Write simple Python program that for the given array: ar = [36.6, 37.3, 38.5, 39.1, 38.7, 36.2] finds the largest element, print its value and its index. Do not use any built in functions, that do that task.""" ar = [36.6, 37.3, 38.5, 39.1, 38.7, 36.2] largest = ar[0] index = 0 for i in range(1, len(ar)): if largest < ar[i]: largest = ar[i] index = i print("Largest element: ", largest) print("index: ", index)

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