online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
print("A beast appeared") print("Tour health is 350") print("The beast's health is 500") class Hero: hero_health = 350 hero_strength = 45 beast_health = 500 beast_damage = 20 attack = "" gamedone = False while gamedone == False: print("Ready to attack") attack = input("(A)ttack!!!: ") if attack == 'A': beast_health = beast_health - hero_strength print("The beast is at",beast_health) else: print('Invalid') import random x=0 while x < 5: beast_attack = random.randint(1,3) if beast_attack > 1: hero_health = hero_health - beast_damage if hero_health > 0: print("Your at",hero_health) else: print("Your at 0") x=5 else: print("The beast missed") x += 1 if hero_health < 1: print("Game Over") gamedone = True elif beast_health < 1: print("Congrats, You win!!!") gamedone = True

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