下面哪条语句可将字符串换行输出:
A: print("爱生活\t爱Python")
B: print("爱生活\n爱Python")
C: print("爱生活\\爱Python")
D: print("爱生活\"爱Python")
A: print("爱生活\t爱Python")
B: print("爱生活\n爱Python")
C: print("爱生活\\爱Python")
D: print("爱生活\"爱Python")
举一反三
- 下列各程序段,哪个选项会有正确的输出:( ) A: if False: print(python) print(java) B: if True: print(python) print(java) C: if True: print(python) print(java) D: if True: print(python) print(java)
- 下面哪一行代码的输出结果不是Python3.7() A: print(“Python3.7”) B: print(“Python”+3.7) C: print(“Python”+str(3.7)) D: print(“Python”+“3.7”)
- 下面那个程序代码是正确的_________ 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")
- 语句print("{0:=^20}".format("Python"))输出结果是: ==============Python|=======Python=======|Python|Python==============
- 下面那个程序代码是正确的_________ 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")