futurecoder icon indicating copy to clipboard operation
futurecoder copied to clipboard

JS Error while running code: Error

Open alexmojaki-bot opened this issue 3 years ago • 0 comments

User Issue Email: (not given) User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36

X = int(input()) contador = 0 neg = 0 pos = 0 ceros = 0

while contador < 10: contador += 1 if X > 0: pos += 1 elif X < 0: neg += 1 else: ceros += 1 X = int(input())

print (f'positivos: {pos} negativos: {neg} ceros: {ceros}')

State is running, not idle

Redux state

{"book":{"error":{"details":"State is running, not idle","title":"JS Error while running code: Error"},"route":"ide","previousRoute":"main","pageSlugsList":["IntroducingTheShell","NavigatingShellHistory","IntroducingStrings","AddingStrings","IntroducingVariables","UsingVariables","WritingPrograms","StoringCalculationsInVariables","IntroducingForLoops","Indentation","BasicForLoopExercises","BuildingUpStrings","BuildingUpStringsExercises","BasicTerminology","IntroducingIfStatements","CombiningCompoundStatements","UnderstandingProgramsWithSnoop","IfAndElse","TheEqualityOperator","IntroducingElif","OtherComparisonOperators","IntroducingLists","BuildingNewLists","UsingBreak","GettingElementsAtPosition","GettingElementsAtPositionExercises","CallingFunctionsTerminology","FunctionsAndMethodsForLists","MoreListFunctionsAndMethods","StringMethodsUnderstandingMutation","HowToFindInformationWithGoogleAndMore","UnderstandingProgramsWithPythonTutor","EqualsVsIs","ModifyingWhileIterating","SingleAndDoubleQuotesInStrings","IntroducingFstrings","IntroducingNestedLoops","IntroducingBirdseye","IntroducingNestedLists","LoopingOverNestedLists","DefiningFunctions","CallingFunctionsWithinFunctions","ReturningValuesFromFunctions","TestingFunctions","MoreOnReturn","IntroducingOr","IntroducingAnd","MultiLineExpressions","CombiningAndAndOr","IntroducingNotPage","IntroducingTicTacToe","NewlinesAndFormatBoard","Types","InteractiveProgramsWithInput","NestedListAssignment","MakingTheBoard","TheFullTicTacToeGame"],"user":{"uid":"NhXHVzr7h7XEwTTjOu7EpbwslmB2","email":null,"developerMode":false,"pageSlug":"GettingElementsAtPositionExercises","pagesProgress":{"BuildingUpStringsExercises":{"step_name":"final_text"},"GettingElementsAtPosition":{"step_name":"final_text"},"IntroducingTheShell":{"step_name":"first_expression"},"NavigatingShellHistory":{"step_name":"final_text"},"IntroducingStrings":{"step_name":"hello_string"},"AddingStrings":{"step_name":"hello_world_concat"},"IntroducingVariables":{"step_name":"word_assign"},"UsingVariables":{"step_name":"name_assign"},"WritingPrograms":{"step_name":"editor_hello_world"},"StoringCalculationsInVariables":{"step_name":"sentence_equals_word_plus_name"},"IntroducingForLoops":{"step_name":"first_for_loop"},"Indentation":{"step_name":"missing_indentation"},"BasicForLoopExercises":{"step_name":"loop_exercise_1"},"BuildingUpStrings":{"step_name":"hello_plus_equals"},"BasicTerminology":{"step_name":"final_text"},"IntroducingIfStatements":{"step_name":"introducing_booleans"},"CombiningCompoundStatements":{"step_name":"for_inside_if"},"UnderstandingProgramsWithSnoop":{"step_name":"print_tail"},"IfAndElse":{"step_name":"first_if_else"},"TheEqualityOperator":{"step_name":"introducing_equality"},"IntroducingElif":{"step_name":"dna_example"},"OtherComparisonOperators":{"step_name":"try_not_equals"},"IntroducingLists":{"step_name":"first_list"},"BuildingNewLists":{"step_name":"double_numbers"},"UsingBreak":{"step_name":"list_contains_exercise"},"GettingElementsAtPositionExercises":{"step_name":"index_exercise"},"CallingFunctionsTerminology":{"step_name":"print_functions"},"FunctionsAndMethodsForLists":{"step_name":"append_vs_concatenate"},"MoreListFunctionsAndMethods":{"step_name":"sorted_predict_exercise"},"StringMethodsUnderstandingMutation":{"step_name":"string_in_step"},"HowToFindInformationWithGoogleAndMore":{"step_name":"sum_list"},"UnderstandingProgramsWithPythonTutor":{"step_name":"run_with_python_tutor"},"EqualsVsIs":{"step_name":"two_separate_lists"},"ModifyingWhileIterating":{"step_name":"run_broken_with_python_tutor"},"SingleAndDoubleQuotesInStrings":{"step_name":"single_quotes_apostrophe"},"IntroducingFstrings":{"step_name":"introduce_f_strings"},"IntroducingNestedLoops":{"step_name":"first_nested_loop"},"IntroducingBirdseye":{"step_name":"first_birdseye_example"},"IntroducingNestedLists":{"step_name":"string_list_exercise"},"LoopingOverNestedLists":{"step_name":"nested_list_nested_loop_example"},"DefiningFunctions":{"step_name":"define_greet"},"CallingFunctionsWithinFunctions":{"step_name":"print_twice_call_print_many"},"ReturningValuesFromFunctions":{"step_name":"first_return"},"TestingFunctions":{"step_name":"introducing_assert_equal"},"MoreOnReturn":{"step_name":"double_return_in_one_function"},"IntroducingOr":{"step_name":"InputAliceBob"},"IntroducingAnd":{"step_name":"TrueAndTrue"},"MultiLineExpressions":{"step_name":"invalid_multiline"},"CombiningAndAndOr":{"step_name":"CombiningAndOr"},"IntroducingNotPage":{"step_name":"IntroducingNot"},"IntroducingTicTacToe":{"step_name":"intro_row_winner"},"NewlinesAndFormatBoard":{"step_name":"one_way_to_print_board"},"Types":{"step_name":"five_different_types"},"InteractiveProgramsWithInput":{"step_name":"first_input"},"NestedListAssignment":{"step_name":"modify_list_in_function"},"MakingTheBoard":{"step_name":"naive_make_board"},"TheFullTicTacToeGame":{"step_name":"the_full_game"}}},"processing":false,"running":false,"numHints":0,"editorContent":"X = int(input())\ncontador = 0\nneg = 0\npos = 0\nceros = 0\n\nwhile contador < 10:\n    contador += 1\n    if X > 0:\n        pos += 1\n    elif X < 0:\n        neg += 1\n    else:\n        ceros += 1\n    X = int(input())\n    \nprint (f'positivos: {pos} negativos: {neg} ceros: {ceros}')","messages":["<p>Your code should start like this:</p>\n<pre><code class=\"codehilite\"><span><span class=\"n\">things</span> <span class=\"o\">=</span> <span class=\"s1\">'...'</span>\n<span class=\"n\">to_find</span> <span class=\"o\">=</span> <span class=\"s1\">'...'</span>\n</span></code></pre>"],"pastMessages":["<p>Your code should start like this:</p>\n<pre><code class=\"codehilite\"><span><span class=\"n\">things</span> <span class=\"o\">=</span> <span class=\"s1\">'...'</span>\n<span class=\"n\">to_find</span> <span class=\"o\">=</span> <span class=\"s1\">'...'</span>\n</span></code></pre>"],"requestingSolution":0,"prediction":{"choices":null,"answer":"","wrongAnswers":[],"userChoice":"","state":"hidden","codeResult":{}},"questionWizard":{"messages":[],"requestExpectedOutput":false,"expectedOutput":""}}}

alexmojaki-bot avatar May 19 '22 17:05 alexmojaki-bot