QuestionQ189Verified/Functions and ExceptionsCopy linkReport a problemAsk AstroTutorSave questionWhat is the expected output from this code? A3 3B1 1CThe code is erroneous.D1 3E3 1Show AnswerAnswerExplanationAssigning num = 3 inside the function creates a local variable, which does not change the global num = 1. The function prints 3, and the final statement prints the unchanged global value, 1.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion