• 2022-06-06
    下列说法不正确的是( )。知识点:全局变量
    A: x = 5def fun(): x = 2 x = x * 3 print(x, end=' ')fun()print(x)程序无误,输出结果为6 5
    B: x = 5def fun(): global x x = 2 x = x*3 print(x, end=' ')fun()print(x)程序无误,输出结果为6 6
    C: x = 5def fun(): x = x * 3 print(x ,end=' ')fun()print(x)程序无误,输出的结果为15 15
    D: x = 5def fun(): print(x, end=' ')fun()print(x)程序无误,输出的结果为5 5