online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
''' Online Python Compiler. Code, Compile, Run and Debug python program online. Write your code in this editor and press "Run" button to execute it. ''' def intro(): print("Welcome Starfall Explorer 300") name = input("Please enter the name of the commanding officer of this ship: ") print("Rodger that", name) print("Your mission today is locate life on other planets.") print("You can visit planets and look for signs of life.") print("If it does not contain living organism you may visit adjacent planets") print("Your mission is complete when you find signs of life.") print("\nTo get started you may go to the planet:") print("A: on your left") print("B: in front of you") print("C: on your right") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": taras() elif selection == "b": endor() elif selection == "c": hypnos() else: invalid() def taras(): print("\n \n") print("You have landed on the planet of Taras.") print("Taras is a mid-sized desert planet.") print("While this planet could theoretically sustain life, it does not currently.") print("\nYou may now go to the planet:") print("A: in front of you") print("B: to your right") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": cyprus() elif selection == "b": endor() else: invalid() def endor(): print("\n \n") print("You have landed on the planet of Endor.") print("Endor is an large ice covered planet") print("Unfortunately the harsh conditions on Endor makes life impossible") print("\nYou may now go to the planet:") print("A: to your left") print("B: in front of you") print("C: to your right") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": taras() elif selection == "b": senus() elif selection == "c": hypnos() else: invalid() def hypnos(): print("\n \n") print("You have landed on the planet of Hypnos.") print("Hypnos is a lava planet in which motlen lava covers the surface.") print("These conditions make life impossible on hypnos.") print("\nYou may now go to the planet:") print("A: to your left") print("B: in front of you") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": endor() elif selection == "b": psyche() else: invalid() def cyprus(): print("\n \n") print("You have landed on the planet of Cyprus.") print("Cyprus is a small ice planet.") print("Many years ago there was life on Cyrus, but they died off") print("\nYou may now go to the planet:") print("A: in front of you") print("B: to your right") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": mondas() elif selection == "b": senus() else: invalid() def senus(): print("\n \n") print("You have landed on the planet of Senus.") print("Senus is stormy gas giant.") print("The lack of solid surface makes life impossible.") print("\nYou may now go to the planet:") print("A: to your left") print("B: in front of you") print("C: to your right") print("D: behind you") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": cyprus() elif selection == "b": minerva() elif selection == "c": psyche() elif selection == "d": endor() else: invalid() def psyche(): print("\n \n") print("You have landed on the planet of Psyche.") print("Psyche is a small gas darf.") print("Life is impossible on psyche.") print("\nYou may now go to the planet:") print("A: to your left") print("B: in front of you") print("C: behind you") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": senus() elif selection == "b": pandora() elif selection == "c": hypnos() else: invalid() def mondas(): print("\n \n") print("You have landed on the planet of Mondas.") print("Mondas is a mid-sized terrestrial planet.") print("Even from the distance of the space craft, you see something glowing.") print("As you get closer, you realize that it is coming from flora covering the planet.") print("The bioluminescence emmited from the planets attracts animals to them.") print("It will take many years to fully research this planet.") print("But for now, your mission is complete.") print("Congradulations!") again = input("\nWould you like to play again?") if again.lower().startswith("y"): print("\n\n") intro() else: print("Goodbye.") def minerva(): print("\n \n") print("You have landed on the planet of Minverva.") print("However, on closer inspection it becomes clear Minerva is actually a comet") print("There is no life on Minerva") print("\nYou may now go to the planet:") print("A: to your left") print("B: to your right") print("C: behing you") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": mondas() elif selection == "b": pandora() elif selection == "c": senus() else: invalid() def pandora(): print("\n \n") print("You have landed on the planet of Pandora.") print("Pandora is a mid-sized ocean planet with volatile storms") print("The harsh storms make life impossible on Pandora.") print("\nYou may now go to the planet:") print("A: to your left") print("B: behind you") selection = input("Where you like to go? [Type the letter of your selection]: ") selection = selection.lower() if selection == "a": minerva() elif selection == "b": psyche() else: invalid() def invalid(): print("\n \n") print("Your responds was invalid") print("You will now be sent back to the begining") intro() intro()

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