online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
from Question import Question question_prompts = [ "What color are apples?\n(a) Red/Green\n)b) Purple\n(c) Orange\n\n", "What color are Bananas?\n(a) Teal\n(b) Magenta\n(c) Yellow\n\n", "What color are strawberries?\n(a) Yellow\n(b) Red\n(b) Blue\n\n" ] questions = [ Question(question_prompts[0], "a"), Question(question_prompts[1], "c"), Question(question_prompts[2], "b"), ] def run_test(questions): score = 0 for question in questions: answer = input(question.prompt) if answer == question.answer: score += 1 print ("You got " + str(score) + "/" + str(len(questions)) + " correct") run_test(questions)
class Question: def __init_(self, prompt, answer): self.prompt = prompt self.answer = answer

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