online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
def main(): # Initialize counters for each grade category num_distinctions = 0 num_passes = 0 num_fails = 0 while True: # Read scores for the first test first_test = int(input("Next student (first test): ")) # Read scores for the second test second_test = int(input("(second test): ")) # Check for sentinel values to end input if first_test == 51 and second_test == 51: break # Calculate the total score total_score = first_test + second_test # Classify the total score into a grade if total_score <=49 : num_fails += 1 elif 50 <= total_score <= 69: num_passes += 1 elif 70 <= total_score <= 100: num_distinctions += 1 # Output the results print(f"Number of Distinctions: {num_distinctions}") print(f"Number of Passes: {num_passes}") print(f"Number of Fails: {num_fails}") main()

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