下面那个程序代码是正确的_________
A: print("Programming is fun") print("Python is fun")
B: print("Programming is fun")print("Python is fun")
C: print("Programming is fun)print("Python is fun")
D: print("Programming is fun)print("Python is fun")
A: print("Programming is fun") print("Python is fun")
B: print("Programming is fun")print("Python is fun")
C: print("Programming is fun)print("Python is fun")
D: print("Programming is fun)print("Python is fun")
举一反三
- 下面那个程序代码是正确的_________ A: print("Programming is fun") print("Python is fun") B: print("Programming is fun")print("Python is fun") C: print("Programming is fun)print("Python is fun") D: print("Programming is fun)print("Python is fun")
- 以下函数调用错误的是:deffun(a,b=200):returna+b A: print(fun(100)) B: print(fun(100,200)) C: print(fun(b=100,a=200)) D: print(fun())
- 下列说法不正确的是( )。知识点:全局变量 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
- 下面程序段的输出为a=1def fun(a): a=a+2 print(a) fun(a)print(a) A: 3 1 B: 4 1 C: 11 D: 33
- 写出下面代码的运行结果( )def fun(a,b): return a+bx=2y=5z=8r=fun(fun(x,y),z)print(r)