• 2022-06-05
    s = 'Python is Open Source!'print(s[0:].upper())上述代码的输出结果是
    A: PYTHON IS OPEN SOURCE!
    B: Python is Open Source!
    C: PYTHON IS OPEN SOURCE
    D: PYTHON
  • A

    举一反三

    内容

    • 0

      给出如下代码:s=‘PythonisOpenSource!’int(s[0:].upper())代码的输出结果是 A: PYTHON IS OPEN SOURCE! B: PYTHON C: Python is Open Source! D: PYTHON IS OPEN SOURCE

    • 1

      中国大学MOOC: 给出如下代码s = Python is Open Source!print(s[0:].upper())上述代码的输出结果是

    • 2

      给出如下代码:‪‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‫s='PythonisOpenSource!'print(s[0:].upper())上述代码的输出结果是‪‪‪‪‪‪‫‪‪‪‪‪‫‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪‪()。 A: PYTHON B: PythonisOpenSource! C: PYTHONISOPENSOURCE! D: PYTHONISOPENSOURCE

    • 3

      下列代码中能够正确实现追加写入的是( )。 A: with open("d:\\python\\data.txt",'w') as f: f.write('Hello!') B: with open("d:\\python\\data.txt",'a') as f: f.write('Hello!') C: with open("d:\\python\\data.txt",'r+') as f: f.write('Hello!') D: with open("d:\\python\\data.txt",'wb+') as f: f.write('Hello!')

    • 4

      下列程序的输出结果是()。f=open('out.txt','w+')f.write('Python') f.seek(0)c=f.read(2) print() f.close() A: Pyth B: Python C: Py D: th