下面语句的运行结果是。 x = "foo" y = 2 print(x+y)
举一反三
- Which of the following are NOT valid if/else statements in Python, assuming x and y are defined appropriately: A: if x < y: print('foo') else: print('bar') B: if x < y and x > 10: print('foo') C: if x < y: print('foo'); print('bar'); print('baz') D: if x < y: print('foo') elif y < x: print('bar') else: print('baz')
- 判断下列程序输出的x的值是?(1),y的值是(2) x = "global" def foo(): global x y = "local" x = x * 2 print(x) print(y) foo()
- Python 语句x=’car’ y = 2 print (x y)的输出结果是
- Python 语句x=’car’; y = 2; print (x+y)的输出结果是? 'carcar’|2|'car2’|语法错
- X=2:Y=8:PRINT X+Y=10的结果是【1】.